mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 17:48:21 +00:00
Deprecate names in BifConst, replace with zeek::BifConst
Some Val* types are also replaced with IntrusivePtr at the new location
This commit is contained in:
parent
eedeb07550
commit
0db5c920f2
39 changed files with 120 additions and 106 deletions
10
src/ID.h
10
src/ID.h
|
@ -212,6 +212,16 @@ IntrusivePtr<T> lookup_val(std::string_view name)
|
|||
*/
|
||||
const IntrusivePtr<Val>& lookup_const(std::string_view name);
|
||||
|
||||
/**
|
||||
* Lookup an ID by its name and return its value (as cast to @c T).
|
||||
* A fatal occurs if the ID does not exist.
|
||||
* @param name The identifier name to lookup
|
||||
* @return The current value of the identifier.
|
||||
*/
|
||||
template<class T>
|
||||
IntrusivePtr<T> lookup_const(std::string_view name)
|
||||
{ return cast_intrusive<T>(lookup_const(name)); }
|
||||
|
||||
/**
|
||||
* Lookup an ID by its name and return the function it references.
|
||||
* A fatal occurs if the ID does not exist or if it is not a function.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue