Allow python to register custom event filters

This commit is contained in:
baldurk
2021-02-25 15:41:55 +00:00
parent 21e52a10e5
commit dcaabf42e9
5 changed files with 223 additions and 66 deletions
@@ -251,11 +251,14 @@ struct varfunc
PyObject *result = PyObject_Call(func, args, 0);
if(result == NULL)
HandleCallbackFailure(global_handle, exHandle);
Py_DECREF(args);
if(result == NULL)
{
HandleCallbackFailure(global_handle, exHandle);
return rettype();
}
return get_return<rettype>(funcname, result, global_handle, exHandle);
}