Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 578d7ab

Browse files
committed
The changes to PyMethod_New and the removal of unbound methods breaks ctypes' COMError on Windows. This patch doesn't address the problem but re-enables the import of _ctypes until somebody has time to fix it right. I've no time to dig into it. Also see http://bugs.python.org/issue1505
1 parent 2e0b755 commit 578d7ab

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

Modules/_ctypes/_ctypes.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4624,12 +4624,13 @@ create_comerror(void)
46244624
PyObject *meth;
46254625
if (func == NULL)
46264626
return -1;
4627-
meth = PyMethod_New(func, NULL, ComError);
4627+
/*meth = PyMethod_New(func, NULL, ComError);
46284628
Py_DECREF(func);
46294629
if (meth == NULL)
4630-
return -1;
4631-
PyDict_SetItemString(dict, methods->ml_name, meth);
4632-
Py_DECREF(meth);
4630+
return -1;*/
4631+
PyDict_SetItemString(dict, methods->ml_name, func);
4632+
/*Py_DECREF(meth);*/
4633+
Py_DECREF(func);
46334634
++methods;
46344635
}
46354636

0 commit comments

Comments
 (0)