CompHash: return IntrusivePtr

This commit is contained in:
Max Kellermann 2020-03-02 19:27:17 +01:00
parent ba35ebec4c
commit 7924e948b9
3 changed files with 46 additions and 52 deletions

View file

@ -18,7 +18,7 @@ public:
HashKey* ComputeHash(const Val* v, int type_check) const;
// Given a hash key, recover the values used to create it.
ListVal* RecoverVals(const HashKey* k) const;
IntrusivePtr<ListVal> RecoverVals(const HashKey* k) const;
unsigned int MemoryAllocation() const { return padded_sizeof(*this) + pad_size(size); }
@ -36,7 +36,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,
BroType* t, Val*& pval, bool optional) const;
BroType* t, IntrusivePtr<Val>& pval, bool optional) const;
// Rounds the given pointer up to the nearest multiple of the
// given size, if not already a multiple.