[Python-checkins] python/dist/src/Objects typeobject.c,2.239,2.240

jhylton@users.sourceforge.net jhylton@users.sourceforge.net
Wed, 16 Jul 2003 09:08:25 -0700


Update of /cvsroot/python/python/dist/src/Objects
In directory sc8-pr-cvs1:/tmp/cvs-serv26984

Modified Files:
	typeobject.c 
Log Message:
Remove unnecessary check in tests for slots allowed.

The !PyType_Check(base) check snuck in as part of rev 2.215, but was
unrelated to the SF patch that is mentioned in the checkin comment.
The test is currently unnecessary because base is set to the return
value of best_bases(), which returns a type or NULL.


Index: typeobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/typeobject.c,v
retrieving revision 2.239
retrieving revision 2.240
diff -C2 -d -r2.239 -r2.240
*** typeobject.c	27 Jun 2003 17:38:27 -0000	2.239
--- typeobject.c	16 Jul 2003 16:08:23 -0000	2.240
***************
*** 1654,1658 ****
  		/* Are slots allowed? */
  		nslots = PyTuple_GET_SIZE(slots);
! 		if (nslots > 0 && base->tp_itemsize != 0 && !PyType_Check(base)) {
  			/* for the special case of meta types, allow slots */
  			PyErr_Format(PyExc_TypeError,
--- 1654,1658 ----
  		/* Are slots allowed? */
  		nslots = PyTuple_GET_SIZE(slots);
! 		if (nslots > 0 && base->tp_itemsize != 0) {
  			/* for the special case of meta types, allow slots */
  			PyErr_Format(PyExc_TypeError,