Mercurial > cpython-lru_cache-weakref
diff Objects/typeobject.c @ 33174:f6fa649fc4af legacy-trunk
Patch #980082: Missing INCREF in PyType_Ready.
| author | Martin v. Löwis <martin@v.loewis.de> |
|---|---|
| date | Wed, 18 Aug 2004 13:16:54 +0000 |
| parents | ff77727555ae |
| children | 781aef974463 |
line wrap: on
line diff
--- a/Objects/typeobject.c Wed Aug 18 12:46:26 2004 +0000 +++ b/Objects/typeobject.c Wed Aug 18 13:16:54 2004 +0000 @@ -3143,8 +3143,10 @@ /* 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) {
