diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2004-08-18 13:16:54 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2004-08-18 13:16:54 (GMT) |
commit | bf608750adb3ae13dbc20eca22a3099e810ad673 (patch) | |
tree | 5d73631d232a3745fffcb2dc76b0c57d89da538d /Objects | |
parent | deacce2c8799c3aa5adfdc4263cc5bf1e933867e (diff) | |
download | cpython-bf608750adb3ae13dbc20eca22a3099e810ad673.zip cpython-bf608750adb3ae13dbc20eca22a3099e810ad673.tar.gz cpython-bf608750adb3ae13dbc20eca22a3099e810ad673.tar.bz2 |
Patch #980082: Missing INCREF in PyType_Ready.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/typeobject.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c index b33b21c..6f5323e 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -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) { |