@@ -30,20 +30,20 @@ void RemoveEventHandlerPlugin(std::string eventName, EContext* L)
3030 plugin->UnregisterEventHandling (eventName);
3131}
3232
33- std::vector<EValue > TriggerEventInternal (std::string eventName, EValue eventPayload, EContext* L)
33+ std::vector<std::any > TriggerEventInternal (std::string eventName, EValue eventPayload, EContext* L)
3434{
35- std::vector<EValue > returnValues;
35+ std::vector<std::any > returnValues;
3636
3737 PluginEvent event (FetchPluginName (L), nullptr , nullptr );
3838
3939 std::string payload = " " ;
4040 size_t len;
4141
42- if (L->GetKind () == ContextKinds::JavaScript) payload = (const char *)JS_GetUint8Array ((JSContext*)L->GetState (), &len, eventPayload.pushJS ());
42+ if (L->GetKind () == ContextKinds::JavaScript) payload = (const char *)JS_GetUint8Array ((JSContext*)L->GetState (), &len, eventPayload.pushJS ());
4343 else payload = eventPayload.cast <std::string>();
4444
45- returnValues.push_back (EValue (L, ( int )g_pluginManager->ExecuteEvent (FetchPluginName (L), eventName, eventPayload, &event) ));
46- returnValues.push_back (EValue (L, event) );
45+ returnValues.push_back (( int )g_pluginManager->ExecuteEvent (FetchPluginName (L), eventName, eventPayload, &event));
46+ returnValues.push_back (event);
4747
4848 return returnValues;
4949}
@@ -101,7 +101,7 @@ void LoadEvent(Plugin* plugin, EContext* state)
101101 .addFunction (" SetNoBroadcast" , &PluginEvent::SetNoBroadcast)
102102 .addFunction (" GetNoBroadcast" , &PluginEvent::GetNoBroadcast)
103103
104- .endClass ();
104+ .endClass ();
105105}
106106
107107LoadScriptingComponent (
0 commit comments