Fixed refcount bug. I placed Py_INCREF in create_comerror() for compatibility

with Python2.7.
This commit is contained in:
Hirokazu Yamamoto 2010-09-12 16:06:18 +00:00
parent 6464d5ffdc
commit 34aa30ca2b
1 changed files with 1 additions and 0 deletions

View File

@ -5120,6 +5120,7 @@ create_comerror(void)
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;
}