diff options
author | Mark Dickinson <dickinsm@gmail.com> | 2009-09-17 00:17:48 (GMT) |
---|---|---|
committer | Mark Dickinson <dickinsm@gmail.com> | 2009-09-17 00:17:48 (GMT) |
commit | 2031d13172078a1b71e37459c2611baa85d8deb9 (patch) | |
tree | 0d0dbfed4a45f71800a3f3d5f52de87ed7514952 /Objects/longobject.c | |
parent | d3aa6467cffa336433d1c813fbaf27e95bdca025 (diff) | |
download | cpython-2031d13172078a1b71e37459c2611baa85d8deb9.zip cpython-2031d13172078a1b71e37459c2611baa85d8deb9.tar.gz cpython-2031d13172078a1b71e37459c2611baa85d8deb9.tar.bz2 |
Bypass long_repr and _PyLong_Format for str(n), repr(n)
Diffstat (limited to 'Objects/longobject.c')
-rw-r--r-- | Objects/longobject.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/Objects/longobject.c b/Objects/longobject.c index 3e7ae04..9f414ca 100644 --- a/Objects/longobject.c +++ b/Objects/longobject.c @@ -2515,12 +2515,6 @@ long_dealloc(PyObject *v) Py_TYPE(v)->tp_free(v); } -static PyObject * -long_repr(PyObject *v) -{ - return _PyLong_Format(v, 10); -} - static int long_compare(PyLongObject *a, PyLongObject *b) { @@ -4289,13 +4283,13 @@ PyTypeObject PyLong_Type = { 0, /* tp_getattr */ 0, /* tp_setattr */ 0, /* tp_reserved */ - long_repr, /* tp_repr */ + long_to_decimal_string, /* tp_repr */ &long_as_number, /* tp_as_number */ 0, /* tp_as_sequence */ 0, /* tp_as_mapping */ (hashfunc)long_hash, /* tp_hash */ 0, /* tp_call */ - long_repr, /* tp_str */ + long_to_decimal_string, /* tp_str */ PyObject_GenericGetAttr, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ |