mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 08:38:20 +00:00
Merge remote-tracking branch 'origin/topic/vern/standalone-id-tracking-fix'
* origin/topic/vern/standalone-id-tracking-fix: fix for tracking identifiers and aggregates when compiling to standalone-C++
This commit is contained in:
commit
aebeae8f8a
5 changed files with 11 additions and 11 deletions
|
@ -43,16 +43,11 @@ shared_ptr<CPP_InitInfo> CPPCompile::RegisterConstant(const ValPtr& vp, int& con
|
|||
// render the same.
|
||||
t->Describe(&d);
|
||||
|
||||
// Likewise, tables that have attributes.
|
||||
if ( t->Tag() == TYPE_TABLE ) {
|
||||
const auto& attrs = v->AsTableVal()->GetAttrs();
|
||||
if ( attrs )
|
||||
attrs->Describe(&d);
|
||||
else
|
||||
d.Add("<no-attrs>");
|
||||
}
|
||||
|
||||
c_desc = d.Description();
|
||||
|
||||
// Aggregates need to be pointer-unique.
|
||||
if ( IsAggr(t) )
|
||||
c_desc += util::fmt("pointer %p", static_cast<void*>(v));
|
||||
}
|
||||
|
||||
auto c = constants.find(c_desc);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue