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 499389f commit 54dc884Copy full SHA for 54dc884
1 file changed
mypyc/lib-rt/generic_ops.c
@@ -75,13 +75,10 @@ PyObject *CPy_SetupObject(PyObject *type) {
75
}
76
77
if (!strcmp(def->ml_name, "__internal_mypyc_setup")) {
78
- break;
+ return ((SetupFunction)(void(*)(void))def->ml_meth)(type);
79
80
81
- if (!def || !def->ml_name) {
82
- PyErr_SetString(PyExc_RuntimeError, "Internal mypyc error: Unable to find object setup function");
83
- return NULL;
84
- }
85
86
- return ((SetupFunction)(void(*)(void))def->ml_meth)(type);
+ PyErr_SetString(PyExc_RuntimeError, "Internal mypyc error: Unable to find object setup function");
+ return NULL;
87
0 commit comments