mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
tracking of original size of records (pre redef'ing)
This commit is contained in:
parent
6e8baafeb9
commit
45004872e8
2 changed files with 8 additions and 0 deletions
|
@ -850,6 +850,8 @@ RecordType::RecordType(type_decl_list* arg_types) : Type(TYPE_RECORD)
|
|||
}
|
||||
else
|
||||
num_fields = 0;
|
||||
|
||||
num_orig_fields = num_fields;
|
||||
}
|
||||
|
||||
// in this case the clone is actually not so shallow, since
|
||||
|
|
|
@ -611,6 +611,7 @@ public:
|
|||
{ return managed_fields; }
|
||||
|
||||
int NumFields() const { return num_fields; }
|
||||
int NumOrigFields() const { return num_orig_fields; }
|
||||
|
||||
/**
|
||||
* Returns a "record_field_table" value for introspection purposes.
|
||||
|
@ -654,7 +655,12 @@ protected:
|
|||
// use std::bitset here instead.
|
||||
std::vector<bool> managed_fields;
|
||||
|
||||
// Number of fields in the type.
|
||||
int num_fields;
|
||||
|
||||
// Number of fields in the type when originally declared.
|
||||
int num_orig_fields;
|
||||
|
||||
type_decl_list* types;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue