[Python-checkins] CVS: python/dist/src/Objects typeobject.c,2.26,2.27
Guido van Rossum
gvanrossum@users.sourceforge.net
Thu, 09 Aug 2001 12:43:39 -0700
Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv18874
Modified Files:
typeobject.c
Log Message:
Sigh. Strengthen the resriction of the previous checkin: tp_new is
inherited unless *both*: (a) the base type is 'object', and (b) the
subtype is not a "heap" type.
Index: typeobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/typeobject.c,v
retrieving revision 2.26
retrieving revision 2.27
diff -C2 -d -r2.26 -r2.27
*** typeobject.c 2001/08/09 19:38:15 2.26
--- typeobject.c 2001/08/09 19:43:37 2.27
***************
*** 1153,1157 ****
COPYSLOT(tp_init);
COPYSLOT(tp_alloc);
! if (type->tp_flags & Py_TPFLAGS_HEAPTYPE) {
COPYSLOT(tp_new);
}
--- 1153,1158 ----
COPYSLOT(tp_init);
COPYSLOT(tp_alloc);
! if (base != &PyBaseObject_Type ||
! (type->tp_flags & Py_TPFLAGS_HEAPTYPE)) {
COPYSLOT(tp_new);
}