From: Guido van Rossum Date: Fri, 1 Feb 2002 15:34:10 +0000 (+0000) Subject: Bugfix candidate. X-Git-Tag: v2.3c1~6749 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e75bfde7e9d2b2a8955eb4ce768a61a1affc3ac5;p=python 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. --- diff --git a/Objects/intobject.c b/Objects/intobject.c index dfb03a9383..6c8bdbeb2a 100644 --- a/Objects/intobject.c +++ b/Objects/intobject.c @@ -893,7 +893,7 @@ PyTypeObject PyInt_Type = { 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 */