mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 10:08:20 +00:00
Add Val::AsFuncPtr() convenience method
Since it's not trivial to store IntrusivePtr in BroValUnion and also not satisfying to store IntrusivePtr*.
This commit is contained in:
parent
5af962e11f
commit
3b6f60a810
4 changed files with 10 additions and 3 deletions
|
@ -84,7 +84,7 @@ IntrusivePtr<Func> zeek::id::find_func(std::string_view name)
|
|||
reporter->InternalError("Expected variable '%s' to be a function",
|
||||
std::string(name).data());
|
||||
|
||||
return {NewRef{}, v->AsFunc()};
|
||||
return v->AsFuncPtr();
|
||||
}
|
||||
|
||||
void zeek::id::detail::init()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue