diff options
author | Guido van Rossum <guido@python.org> | 2002-02-01 15:34:10 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2002-02-01 15:34:10 (GMT) |
commit | e75bfde7e9d2b2a8955eb4ce768a61a1affc3ac5 (patch) | |
tree | e9ddcd6d3c18851531e7cf30b956dc317bfb9b14 /Objects | |
parent | ab034fab03bf1a0ee1d03651799f1c42f4f48050 (diff) | |
download | cpython-e75bfde7e9d2b2a8955eb4ce768a61a1affc3ac5.zip cpython-e75bfde7e9d2b2a8955eb4ce768a61a1affc3ac5.tar.gz cpython-e75bfde7e9d2b2a8955eb4ce768a61a1affc3ac5.tar.bz2 |
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.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/intobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/intobject.c b/Objects/intobject.c index dfb03a9..6c8bdbe 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 */ |