mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Use type aliases for IntrusivePtr definitions
This commit is contained in:
parent
f6a251cdac
commit
ec9eff0bd5
180 changed files with 2026 additions and 1893 deletions
|
@ -10,9 +10,11 @@
|
|||
class ListVal;
|
||||
class HashKey;
|
||||
|
||||
using ListValPtr = zeek::IntrusivePtr<ListVal>;
|
||||
|
||||
class CompositeHash {
|
||||
public:
|
||||
explicit CompositeHash(zeek::IntrusivePtr<zeek::TypeList> composite_type);
|
||||
explicit CompositeHash(zeek::TypeListPtr composite_type);
|
||||
~CompositeHash();
|
||||
|
||||
// Compute the hash corresponding to the given index val,
|
||||
|
@ -24,10 +26,10 @@ public:
|
|||
{ return MakeHashKey(*v, type_check).release(); }
|
||||
|
||||
// Given a hash key, recover the values used to create it.
|
||||
zeek::IntrusivePtr<ListVal> RecoverVals(const HashKey& k) const;
|
||||
ListValPtr RecoverVals(const HashKey& k) const;
|
||||
|
||||
[[deprecated("Remove in v4.1. Pass in HashKey& instead.")]]
|
||||
zeek::IntrusivePtr<ListVal> RecoverVals(const HashKey* k) const
|
||||
ListValPtr RecoverVals(const HashKey* k) const
|
||||
{ return RecoverVals(*k); }
|
||||
|
||||
unsigned int MemoryAllocation() const { return padded_sizeof(*this) + pad_size(size); }
|
||||
|
@ -46,7 +48,7 @@ protected:
|
|||
// 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, zeek::IntrusivePtr<Val>* pval, bool optional) const;
|
||||
zeek::Type* t, ValPtr* pval, bool optional) const;
|
||||
|
||||
// Rounds the given pointer up to the nearest multiple of the
|
||||
// given size, if not already a multiple.
|
||||
|
@ -89,7 +91,7 @@ protected:
|
|||
bool type_check, int sz, bool optional,
|
||||
bool calc_static_size) const;
|
||||
|
||||
zeek::IntrusivePtr<zeek::TypeList> type;
|
||||
zeek::TypeListPtr 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