[Python-checkins] CVS: python/dist/src/Objects typeobject.c,2.70,2.71
Guido van Rossum
gvanrossum@users.sourceforge.net
Mon, 24 Sep 2001 11:47:42 -0700
Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv22870/Objects
Modified Files:
typeobject.c
Log Message:
Another comparison patch-up: comparing a type with a dynamic metatype
to one with a static metatype raised an obscure error.
Index: typeobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/typeobject.c,v
retrieving revision 2.70
retrieving revision 2.71
diff -C2 -d -r2.70 -r2.71
*** typeobject.c 2001/09/24 16:03:58 2.70
--- typeobject.c 2001/09/24 18:47:39 2.71
***************
*** 2034,2038 ****
if (!PyArg_ParseTuple(args, "O", &other))
return NULL;
! if (!PyType_IsSubtype(other->ob_type, self->ob_type)) {
PyErr_Format(
PyExc_TypeError,
--- 2034,2039 ----
if (!PyArg_ParseTuple(args, "O", &other))
return NULL;
! if (other->ob_type->tp_compare != func &&
! !PyType_IsSubtype(other->ob_type, self->ob_type)) {
PyErr_Format(
PyExc_TypeError,