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.
This commit is contained in:
Guido van Rossum 2002-06-10 15:29:03 +00:00
parent a386209754
commit cab05807fc

View file

@ -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;