mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 15:48:19 +00:00
Merge remote-tracking branch 'origin/topic/jsiwek/type-alias-introspection'
* origin/topic/jsiwek/type-alias-introspection: Add enum_names() BIF to return names of an enum type's values Add type_aliases() BIF for introspecting type-names of types/values Change Type::type_aliases map to store IntrusivePtr Fix lookup_ID() BIF to return enum values
This commit is contained in:
commit
aab99b743d
12 changed files with 301 additions and 13 deletions
|
@ -382,10 +382,10 @@ void add_type(ID* id, TypePtr t, std::unique_ptr<std::vector<AttrPtr>> attr)
|
|||
// Clone the type to preserve type name aliasing.
|
||||
tnew = t->ShallowClone();
|
||||
|
||||
Type::AddAlias(new_type_name, tnew.get());
|
||||
Type::RegisterAlias(new_type_name, tnew);
|
||||
|
||||
if ( new_type_name != old_type_name && ! old_type_name.empty() )
|
||||
Type::AddAlias(old_type_name, tnew.get());
|
||||
Type::RegisterAlias(old_type_name, tnew);
|
||||
|
||||
tnew->SetName(id->Name());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue