Switch plugin::Manager::HookCallFunction() to return IntrusivePtr

The plugin::Plugin side of things is not (yet) changed.
This commit is contained in:
Jon Siwek 2020-05-22 17:48:35 -07:00
parent b1042e2824
commit 46c5dea733
4 changed files with 49 additions and 36 deletions

View file

@ -245,15 +245,18 @@ public:
*
* @param func The function to be called.
*
* @param parent The frame in which the function is being called.
*
* @param args The function call's arguments; they may be modified by the
* method.
*
* @return If a plugin handled the call, a Val with a +1 reference count
* containing the result value to pass back to the interpreter (for void
* functions and events, it may be any Val and must be ignored). If no
* plugin handled the call, the method returns null.
* @return If a plugin handled the call, a Val representing the result
* to pass back to the interpreter (for void functions and events,
* it may be any Val and must be ignored). If no plugin handled the call,
* the method returns null.
*/
std::pair<bool, Val*> HookCallFunction(const Func* func, Frame* parent, const zeek::Args& args) const;
std::pair<bool, IntrusivePtr<Val>>
HookCallFunction(const Func* func, Frame* parent, const zeek::Args& args) const;
/**
* Hook that filters the queuing of an event.