mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Move IntrusivePtr and utility methods to the zeek namespace
This commit is contained in:
parent
4668378d91
commit
9364e6a5b7
255 changed files with 3761 additions and 3730 deletions
|
@ -12,7 +12,7 @@ class HashKey;
|
|||
|
||||
class CompositeHash {
|
||||
public:
|
||||
explicit CompositeHash(IntrusivePtr<zeek::TypeList> composite_type);
|
||||
explicit CompositeHash(zeek::IntrusivePtr<zeek::TypeList> composite_type);
|
||||
~CompositeHash();
|
||||
|
||||
// Compute the hash corresponding to the given index val,
|
||||
|
@ -24,10 +24,10 @@ public:
|
|||
{ return MakeHashKey(*v, type_check).release(); }
|
||||
|
||||
// Given a hash key, recover the values used to create it.
|
||||
IntrusivePtr<ListVal> RecoverVals(const HashKey& k) const;
|
||||
zeek::IntrusivePtr<ListVal> RecoverVals(const HashKey& k) const;
|
||||
|
||||
[[deprecated("Remove in v4.1. Pass in HashKey& instead.")]]
|
||||
IntrusivePtr<ListVal> RecoverVals(const HashKey* k) const
|
||||
zeek::IntrusivePtr<ListVal> RecoverVals(const HashKey* k) const
|
||||
{ return RecoverVals(*k); }
|
||||
|
||||
unsigned int MemoryAllocation() const { return padded_sizeof(*this) + pad_size(size); }
|
||||
|
@ -38,15 +38,15 @@ protected:
|
|||
// Computes the piece of the hash for Val*, returning the new kp.
|
||||
// Used as a helper for ComputeHash in the non-singleton case.
|
||||
char* SingleValHash(bool type_check, char* kp, zeek::Type* bt, Val* v,
|
||||
bool optional) const;
|
||||
bool optional) const;
|
||||
|
||||
// Recovers just one Val of possibly many; called from RecoverVals.
|
||||
// Upon return, pval will point to the recovered Val of type t.
|
||||
// Returns and updated kp for the next Val. Calls reporter->InternalError()
|
||||
// upon errors, so there is no return value for invalid input.
|
||||
const char* RecoverOneVal(const HashKey& k,
|
||||
const char* kp, const char* const k_end,
|
||||
zeek::Type* t, IntrusivePtr<Val>* pval, bool optional) const;
|
||||
const char* RecoverOneVal(
|
||||
const HashKey& k, const char* kp, const char* const k_end,
|
||||
zeek::Type* t, zeek::IntrusivePtr<Val>* pval, bool optional) const;
|
||||
|
||||
// Rounds the given pointer up to the nearest multiple of the
|
||||
// given size, if not already a multiple.
|
||||
|
@ -89,7 +89,7 @@ protected:
|
|||
bool type_check, int sz, bool optional,
|
||||
bool calc_static_size) const;
|
||||
|
||||
IntrusivePtr<zeek::TypeList> type;
|
||||
zeek::IntrusivePtr<zeek::TypeList> type;
|
||||
char* key; // space for composite key
|
||||
int size;
|
||||
bool is_singleton; // if just one type in index
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue