commit | 34aa30ca2b99cbc3157ca9ff7b1499860c7ab5ac | [log] [tgz] |
---|---|---|
author | Hirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp> | Sun Sep 12 16:06:18 2010 +0000 |
committer | Hirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp> | Sun Sep 12 16:06:18 2010 +0000 |
tree | a3519829248e626420317e0ef464218e7dbb8d3a | |
parent | 6464d5ffdc6ee54f023c6230f1633debf183815f [diff] |
Fixed refcount bug. I placed Py_INCREF in create_comerror() for compatibility with Python2.7.
diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c index a6df55c..aaf46ea 100644 --- a/Modules/_ctypes/_ctypes.c +++ b/Modules/_ctypes/_ctypes.c
@@ -5120,6 +5120,7 @@ PyComError_Type.tp_base = (PyTypeObject*)PyExc_Exception; if (PyType_Ready(&PyComError_Type) < 0) return -1; + Py_INCREF(&PyComError_Type); ComError = (PyObject*)&PyComError_Type; return 0; }