summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2002-06-10 15:29:03 (GMT)
committerGuido van Rossum <guido@python.org>2002-06-10 15:29:03 (GMT)
commitcab05807fc89390ce48388442843361c3f2f7a86 (patch)
tree3d8e7788e4581f7c577c4a1e735f19db1a9777d4
parenta386209754139c13a2a72c53c688172371756a2a (diff)
downloadcpython-cab05807fc89390ce48388442843361c3f2f7a86.zip
cpython-cab05807fc89390ce48388442843361c3f2f7a86.tar.gz
cpython-cab05807fc89390ce48388442843361c3f2f7a86.tar.bz2
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.
-rw-r--r--Objects/typeobject.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 8b51a53..49c7d52 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;