[Python-checkins] python/dist/src/Objects typeobject.c,2.150,2.151
gvanrossum@users.sourceforge.net
gvanrossum@users.sourceforge.net
Mon, 10 Jun 2002 08:29:10 -0700
Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv27767
Modified Files:
typeobject.c
Log Message:
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.
Index: typeobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/typeobject.c,v
retrieving revision 2.150
retrieving revision 2.151
diff -C2 -d -r2.150 -r2.151
*** typeobject.c 10 Jun 2002 15:24:42 -0000 2.150
--- typeobject.c 10 Jun 2002 15:29:03 -0000 2.151
***************
*** 2176,2181 ****
int i, n;
! if (type->tp_flags & Py_TPFLAGS_READY)
return 0;
assert((type->tp_flags & Py_TPFLAGS_READYING) == 0);
--- 2176,2183 ----
int i, n;
! if (type->tp_flags & Py_TPFLAGS_READY) {
! assert(type->tp_dict != NULL);
return 0;
+ }
assert((type->tp_flags & Py_TPFLAGS_READYING) == 0);