From cab05807fc89390ce48388442843361c3f2f7a86 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Mon, 10 Jun 2002 15:29:03 +0000 Subject: [PATCH] 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. --- Objects/typeobject.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; -- 2.50.1