diff --git a/src/OpaqueVal.cc b/src/OpaqueVal.cc index 10abdfa679..d289d452f6 100644 --- a/src/OpaqueVal.cc +++ b/src/OpaqueVal.cc @@ -3,6 +3,7 @@ #include #include "OpaqueVal.h" +#include "CompHash.h" #include "NetVar.h" #include "Reporter.h" #include "Scope.h" diff --git a/src/Stmt.cc b/src/Stmt.cc index 8766a1a75a..39999058ca 100644 --- a/src/Stmt.cc +++ b/src/Stmt.cc @@ -2,6 +2,7 @@ #include "zeek-config.h" +#include "CompHash.h" #include "Expr.h" #include "Event.h" #include "Frame.h" diff --git a/src/Val.cc b/src/Val.cc index a3064980d4..cdf8cf12df 100644 --- a/src/Val.cc +++ b/src/Val.cc @@ -14,6 +14,7 @@ #include #include "Attr.h" +#include "CompHash.h" #include "Dict.h" #include "Net.h" #include "File.h" @@ -2555,6 +2556,11 @@ unsigned int TableVal::MemoryAllocation() const + table_hash->MemoryAllocation(); } +HashKey* TableVal::ComputeHash(const Val* index) const + { + return table_hash->ComputeHash(index, 1); + } + vector RecordVal::parse_time_records; RecordVal::RecordVal(RecordType* t, bool init_fields) : Val(t) diff --git a/src/Val.h b/src/Val.h index f58edcf0e2..219198df95 100644 --- a/src/Val.h +++ b/src/Val.h @@ -3,7 +3,6 @@ #pragma once #include "Type.h" -#include "CompHash.h" #include "BroString.h" #include "Timer.h" #include "Notifier.h" @@ -698,6 +697,7 @@ protected: }; class CompositeHash; +class HashKey; class Frame; class TableVal : public Val, public notifier::Modifiable { @@ -814,8 +814,7 @@ public: timer = 0; } - HashKey* ComputeHash(const Val* index) const - { return table_hash->ComputeHash(index, 1); } + HashKey* ComputeHash(const Val* index) const; notifier::Modifiable* Modifiable() override { return this; }