Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e75bfde

Browse files
committed
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.
1 parent ab034fa commit e75bfde

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Objects/intobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -893,7 +893,7 @@ PyTypeObject PyInt_Type = {
893893
0, /* tp_as_mapping */
894894
(hashfunc)int_hash, /* tp_hash */
895895
0, /* tp_call */
896-
0, /* tp_str */
896+
(reprfunc)int_repr, /* tp_str */
897897
PyObject_GenericGetAttr, /* tp_getattro */
898898
0, /* tp_setattro */
899899
0, /* tp_as_buffer */

0 commit comments

Comments
 (0)