mirror of
https://github.com/zeek/zeek.git
synced 2025-10-11 02:58:20 +00:00
Fixing a problem with records having optional fields when used as
table/set indices. This addresses #367. In principle, the fix is quite straightford. However, it turns out that sometimes record fields lost their attributes on assignment, and then the hashing can't decide anymore whether a field is optional or not. So that needed to be fixed as well.
This commit is contained in:
parent
e00acaddd8
commit
7abd8f177f
7 changed files with 171 additions and 33 deletions
|
@ -509,6 +509,9 @@ inline BroType* error_type() { return base_type(TYPE_ERROR); }
|
|||
// test is done in the context of an initialization.
|
||||
extern int same_type(const BroType* t1, const BroType* t2, int is_init=0);
|
||||
|
||||
// True if the two attribute lists are equivalent.
|
||||
extern int same_attrs(const Attributes* a1, const Attributes* a2);
|
||||
|
||||
// Returns true if the record sub_rec can be promoted to the record
|
||||
// super_rec.
|
||||
extern int record_promotion_compatible(const RecordType* super_rec,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue