Closed hongweipeng closed 2 years ago
Didn't pay attention close enough when I merged. After the fact I simplified the C code to:
static PyObject *WraptFunctionWrapperBase_instancecheck(
WraptFunctionWrapperObject *self, PyObject *instance)
{
PyObject *object = NULL;
PyObject *result = NULL;
int check = 0;
if (!self->object_proxy.wrapped) {
PyErr_SetString(PyExc_ValueError, "wrapper has not been initialized");
return NULL;
}
check = PyObject_IsInstance(instance, self->object_proxy.wrapped);
if (check < 0) {
return NULL;
}
result = check ? Py_True : Py_False;
Py_INCREF(result);
return result;
}
Going to close and reopen this to try and force ability to run tests via GitHub actions. Option not showing.