mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-12 21:10:42 +00:00
Fix compile errors with python bindings on callbacks with return values
This commit is contained in:
@@ -92,14 +92,13 @@ inline T get_return(const char *funcname, PyObject *result, PyObject *global_han
|
||||
{
|
||||
T val = T();
|
||||
|
||||
int res = ConvertToPy(result, val);
|
||||
int res = ConvertFromPy(result, val);
|
||||
|
||||
if(!SWIG_IsOK(res))
|
||||
{
|
||||
HandleCallbackFailure(global_handle, exHandle);
|
||||
|
||||
PyErr_Format(PyExc_TypeError, "Expected a '%s' for return value of callback in %s",
|
||||
TypeName<T>(), funcname);
|
||||
PyErr_Format(PyExc_TypeError, "Unexpected type for return value of callback in %s", funcname);
|
||||
}
|
||||
|
||||
Py_XDECREF(result);
|
||||
|
||||
Reference in New Issue
Block a user