Fixed refcount bug. I placed Py_INCREF in create_comerror() for compatibility
with Python2.7.
This commit is contained in:
parent
6464d5ffdc
commit
34aa30ca2b
|
@ -5120,6 +5120,7 @@ create_comerror(void)
|
||||||
PyComError_Type.tp_base = (PyTypeObject*)PyExc_Exception;
|
PyComError_Type.tp_base = (PyTypeObject*)PyExc_Exception;
|
||||||
if (PyType_Ready(&PyComError_Type) < 0)
|
if (PyType_Ready(&PyComError_Type) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
Py_INCREF(&PyComError_Type);
|
||||||
ComError = (PyObject*)&PyComError_Type;
|
ComError = (PyObject*)&PyComError_Type;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue