8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 954900a commit ea683deCopy full SHA for ea683de
Modules/_ctypes/_ctypes.c
@@ -1168,7 +1168,11 @@ PyCPointerType_from_param(PyObject *type, PyObject *value)
1168
*/
1169
StgDictObject *v = PyObject_stgdict(value);
1170
assert(v); /* Cannot be NULL for pointer or array objects */
1171
- if (PyObject_IsSubclass(v->proto, typedict->proto)) {
+ int ret = PyObject_IsSubclass(v->proto, typedict->proto);
1172
+ if (ret < 0) {
1173
+ return NULL;
1174
+ }
1175
+ if (ret) {
1176
Py_INCREF(value);
1177
return value;
1178
}
0 commit comments