diff Objects/intobject.c @ 21858:d521cf0899c8 legacy-trunk

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.
author Guido van Rossum <guido@python.org>
date Fri, 01 Feb 2002 15:34:10 +0000
parents 81928c9d7011
children 3eddd9d68af7 aa8d59823add
line wrap: on
line diff
--- a/Objects/intobject.c	Fri Feb 01 11:27:43 2002 +0000
+++ b/Objects/intobject.c	Fri Feb 01 15:34:10 2002 +0000
@@ -893,7 +893,7 @@
 	0,					/* tp_as_mapping */
 	(hashfunc)int_hash,			/* tp_hash */
         0,					/* tp_call */
-        0,					/* tp_str */
+        (reprfunc)int_repr,			/* tp_str */
 	PyObject_GenericGetAttr,		/* tp_getattro */
 	0,					/* tp_setattro */
 	0,					/* tp_as_buffer */