From: Guido van Rossum Date: Mon, 10 Jun 2002 15:29:03 +0000 (+0000) Subject: Undo the last chunk of the previous patch, putting back a useful X-Git-Tag: v2.3c1~5398 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cab05807fc89390ce48388442843361c3f2f7a86;p=python Undo the last chunk of the previous patch, putting back a useful assert into PyType_Ready(): now that we're not clearing tp_dict, we can assert that it's non-NULL again. --- diff --git a/Objects/typeobject.c b/Objects/typeobject.c index 8b51a53fb4..49c7d5250f 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -2175,8 +2175,10 @@ PyType_Ready(PyTypeObject *type) PyTypeObject *base; int i, n; - if (type->tp_flags & Py_TPFLAGS_READY) + if (type->tp_flags & Py_TPFLAGS_READY) { + assert(type->tp_dict != NULL); return 0; + } assert((type->tp_flags & Py_TPFLAGS_READYING) == 0); type->tp_flags |= Py_TPFLAGS_READYING;