This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients loewis, pitrou
Date 2012-06-22.19:56:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1340394967.19.0.943084432103.issue15142@psf.upfronthosting.co.za>
In-reply-to
Content
The following patch seems to fix the issue explained in http://mail.python.org/pipermail/python-dev/2012-June/120659.html :


diff --git a/Objects/typeobject.c b/Objects/typeobject.c
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -2417,6 +2417,10 @@ PyType_FromSpec(PyType_Spec *spec)
     if (res->ht_type.tp_dictoffset) {
         res->ht_cached_keys = _PyDict_NewKeysForClass();
     }
+    if (res->ht_type.tp_dealloc == NULL) {
+        /* It's a heap type, so needs the heap types' dealloc */
+        res->ht_type.tp_dealloc = subtype_dealloc;
+    }
 
     if (PyType_Ready(&res->ht_type) < 0)
         goto fail;
History
Date User Action Args
2012-06-22 19:56:07pitrousetrecipients: + pitrou, loewis
2012-06-22 19:56:07pitrousetmessageid: <1340394967.19.0.943084432103.issue15142@psf.upfronthosting.co.za>
2012-06-22 19:56:06pitroulinkissue15142 messages
2012-06-22 19:56:06pitroucreate