[Python-checkins] r84741 - python/branches/py3k/Modules/_ctypes/_ctypes.c
hirokazu.yamamoto
python-checkins at python.org
Sun Sep 12 18:06:18 CEST 2010
Author: hirokazu.yamamoto
Date: Sun Sep 12 18:06:18 2010
New Revision: 84741
Log:
Fixed refcount bug. I placed Py_INCREF in create_comerror() for compatibility
with Python2.7.
Modified:
python/branches/py3k/Modules/_ctypes/_ctypes.c
Modified: python/branches/py3k/Modules/_ctypes/_ctypes.c
==============================================================================
--- python/branches/py3k/Modules/_ctypes/_ctypes.c (original)
+++ python/branches/py3k/Modules/_ctypes/_ctypes.c Sun Sep 12 18:06:18 2010
@@ -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;
}
More information about the Python-checkins
mailing list