[Python-checkins] CVS: python/dist/src/Objects intobject.c,2.79,2.79.6.1

Michael Hudson mwh@users.sourceforge.net
Tue, 19 Feb 2002 06:17:05 -0800


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

Modified Files:
      Tag: release22-maint
	intobject.c 
Log Message:
Backport gvanrossum's checkin of revision 2.80:

Bugfix candidate.

Fix SF bug #511603: Error calling str on subclass of int

Explicitly fill in tp_str with the same pointer as tp_repr.



Index: intobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/intobject.c,v
retrieving revision 2.79
retrieving revision 2.79.6.1
diff -C2 -d -r2.79 -r2.79.6.1
*** intobject.c	4 Dec 2001 23:05:10 -0000	2.79
--- intobject.c	19 Feb 2002 14:17:02 -0000	2.79.6.1
***************
*** 894,898 ****
  	(hashfunc)int_hash,			/* tp_hash */
          0,					/* tp_call */
!         0,					/* tp_str */
  	PyObject_GenericGetAttr,		/* tp_getattro */
  	0,					/* tp_setattro */
--- 894,898 ----
  	(hashfunc)int_hash,			/* tp_hash */
          0,					/* tp_call */
!         (reprfunc)int_repr,			/* tp_str */
  	PyObject_GenericGetAttr,		/* tp_getattro */
  	0,					/* tp_setattro */