mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 10:08:20 +00:00
Merge remote branch 'origin/topic/robin/logging-internals'
Includes some additional cleanup.
This commit is contained in:
commit
13a492091f
119 changed files with 5266 additions and 183 deletions
19
src/ID.cc
19
src/ID.cc
|
@ -235,6 +235,25 @@ void ID::UpdateValAttrs()
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( Type()->Tag() == TYPE_RECORD )
|
||||
{
|
||||
Attr* attr = attrs->FindAttr(ATTR_LOG);
|
||||
if ( attr )
|
||||
{
|
||||
// Apply &log to all record fields.
|
||||
RecordType* rt = Type()->AsRecordType();
|
||||
for ( int i = 0; i < rt->NumFields(); ++i )
|
||||
{
|
||||
TypeDecl* fd = rt->FieldDecl(i);
|
||||
|
||||
if ( ! fd->attrs )
|
||||
fd->attrs = new Attributes(new attr_list, rt->FieldType(i), true);
|
||||
|
||||
fd->attrs->AddAttr(new Attr(ATTR_LOG));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ID::AddAttrs(Attributes* a)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue