Patch #980082: Missing INCREF in PyType_Ready.

This commit is contained in:
Martin v. Löwis 2004-08-18 13:16:54 +00:00
parent deacce2c87
commit bf608750ad

View File

@ -3143,8 +3143,10 @@ PyType_Ready(PyTypeObject *type)
/* Initialize tp_base (defaults to BaseObject unless that's us) */
base = type->tp_base;
if (base == NULL && type != &PyBaseObject_Type)
if (base == NULL && type != &PyBaseObject_Type) {
base = type->tp_base = &PyBaseObject_Type;
Py_INCREF(base);
}
/* Initialize the base class */
if (base && base->tp_dict == NULL) {