mirror of
https://github.com/python/cpython.git
synced 2026-04-04 19:13:16 +00:00
Fixed refcount bug. I placed Py_INCREF in create_comerror() for compatibility
with Python2.7.
This commit is contained in:
parent
6464d5ffdc
commit
34aa30ca2b
1 changed files with 1 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue