Deprecate internal_type(), replace with zeek::lookup_type()

This commit is contained in:
Jon Siwek 2020-05-08 17:44:20 -07:00
parent 32b895f4ba
commit ac06259eec
44 changed files with 218 additions and 182 deletions

View file

@ -761,12 +761,17 @@ ListVal* internal_list_val(const char* name)
}
BroType* internal_type(const char* name)
{
return zeek::lookup_type(name).get();
}
const IntrusivePtr<BroType>& zeek::lookup_type(const char* name)
{
auto id = lookup_ID(name, GLOBAL_MODULE_NAME);
if ( ! id )
reporter->InternalError("internal type %s missing", name);
reporter->InternalError("Failed to find type named: %s", name);
return id->GetType().get();
return id->GetType();
}
Func* internal_func(const char* name)