Updating tests and tweaking HookArgument to include Frame support.

* Add frame support to HookArgument, since it's a new argument to HookCallFunction
* Fix test in api-version-mismatch to remove absolute paths from output
* Update test plugin to use new HookCallFunction interface
This commit is contained in:
Gilbert Clark 2014-10-02 19:23:59 -04:00
parent 0104d7147d
commit 70c7258dfa
7 changed files with 879 additions and 899 deletions

View file

@ -5,6 +5,7 @@
#include <Event.h>
namespace plugin { namespace Demo_Hooks { Plugin plugin; } }
using plugin::ValWrapper;
using namespace plugin::Demo_Hooks;
@ -48,7 +49,7 @@ int Plugin::HookLoadFile(const std::string& file, const std::string& ext)
return -1;
}
Val* Plugin::HookCallFunction(const Func* func, Frame* frame, val_list* args)
ValWrapper* Plugin::HookCallFunction(const Func* func, Frame* frame, val_list* args)
{
ODesc d;
d.SetShort();

View file

@ -11,7 +11,7 @@ class Plugin : public ::plugin::Plugin
{
protected:
virtual int HookLoadFile(const std::string& file, const std::string& ext);
virtual Val* HookCallFunction(const Func* func, Frame* frame, val_list* args);
virtual plugin::ValWrapper* HookCallFunction(const Func* func, Frame* frame, val_list* args);
virtual bool HookQueueEvent(Event* event);
virtual void HookDrainEvents();
virtual void HookUpdateNetworkTime(double network_time);