summaryrefslogtreecommitdiffstats
path: root/Modules/_ctypes
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_ctypes')
-rw-r--r--Modules/_ctypes/_ctypes.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c
index 05a9fca4..cf0cb9a 100644
--- a/Modules/_ctypes/_ctypes.c
+++ b/Modules/_ctypes/_ctypes.c
@@ -4624,12 +4624,13 @@ create_comerror(void)
PyObject *meth;
if (func == NULL)
return -1;
- meth = PyMethod_New(func, NULL, ComError);
+ /*meth = PyMethod_New(func, NULL, ComError);
Py_DECREF(func);
if (meth == NULL)
- return -1;
- PyDict_SetItemString(dict, methods->ml_name, meth);
- Py_DECREF(meth);
+ return -1;*/
+ PyDict_SetItemString(dict, methods->ml_name, func);
+ /*Py_DECREF(meth);*/
+ Py_DECREF(func);
++methods;
}