Fix PyGPU: return NULL instead of PyNone on error

Error in d7f124f06f
This commit is contained in:
2022-11-29 13:59:52 -03:00
parent d7f124f06f
commit 8fa8cea8e0

View File

@@ -56,13 +56,13 @@ static const char g_error[] = "GPU API is not available in background mode";
static PyObject *py_error__ml_meth(PyObject *UNUSED(self), PyObject *UNUSED(args))
{
PyErr_SetString(PyExc_SystemError, g_error);
Py_RETURN_NONE;
return NULL;
}
static PyObject *py_error__getter(PyObject *UNUSED(self), void *UNUSED(type))
{
PyErr_SetString(PyExc_SystemError, g_error);
Py_RETURN_NONE;
return NULL;
}
static int py_error__setter(PyObject *UNUSED(self), PyObject *value, void *UNUSED(type))