mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 17:18:20 +00:00
Improve RecordVal JSON formatting
No need to create a record introspection table each time when all the required information can be obtained directly in the RecordVal and RecordType objects. Besides the additional overhead, using such a table will re-order the fields arbitrarily instead of using the order in which they're defined.
This commit is contained in:
parent
d258ebe5ca
commit
a34ade4876
4 changed files with 25 additions and 24 deletions
|
@ -498,6 +498,12 @@ public:
|
|||
return decl && decl->FindAttr(ATTR_DEPRECATED) != 0;
|
||||
}
|
||||
|
||||
bool FieldHasAttr(int field, attr_tag at) const
|
||||
{
|
||||
const TypeDecl* decl = FieldDecl(field);
|
||||
return decl && decl->FindAttr(at) != 0;
|
||||
}
|
||||
|
||||
string GetFieldDeprecationWarning(int field, bool has_check) const;
|
||||
|
||||
protected:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue