@@ -35,7 +35,7 @@ static PyLongObject *long_normalize(PyLongObject *);
3535static PyLongObject * mul1 (PyLongObject * , wdigit );
3636static PyLongObject * muladd1 (PyLongObject * , wdigit , wdigit );
3737static PyLongObject * divrem1 (PyLongObject * , digit , digit * );
38- static PyObject * long_format (PyObject * aa , int base , int addL );
38+ static PyObject * long_format (PyObject * aa , int base );
3939
4040#define SIGCHECK (PyTryBlock ) \
4141 if (--_Py_Ticker < 0) { \
@@ -1198,7 +1198,7 @@ divrem1(PyLongObject *a, digit n, digit *prem)
11981198 If base is 8 or 16, add the proper prefix '0' or '0x'. */
11991199
12001200static PyObject *
1201- long_format (PyObject * aa , int base , int addL )
1201+ long_format (PyObject * aa , int base )
12021202{
12031203 register PyLongObject * a = (PyLongObject * )aa ;
12041204 PyStringObject * str ;
@@ -1222,14 +1222,12 @@ long_format(PyObject *aa, int base, int addL)
12221222 ++ bits ;
12231223 i >>= 1 ;
12241224 }
1225- i = 5 + (addL ? 1 : 0 ) + ( size_a * SHIFT + bits - 1 ) / bits ;
1225+ i = 5 + (size_a * SHIFT + bits - 1 ) / bits ;
12261226 str = (PyStringObject * ) PyString_FromStringAndSize ((char * )0 , i );
12271227 if (str == NULL )
12281228 return NULL ;
12291229 p = PyString_AS_STRING (str ) + i ;
12301230 * p = '\0' ;
1231- if (addL )
1232- * -- p = 'L' ;
12331231 if (a -> ob_size < 0 )
12341232 sign = '-' ;
12351233
@@ -1890,13 +1888,7 @@ long_dealloc(PyObject *v)
18901888static PyObject *
18911889long_repr (PyObject * v )
18921890{
1893- return long_format (v , 10 , 1 );
1894- }
1895-
1896- static PyObject *
1897- long_str (PyObject * v )
1898- {
1899- return long_format (v , 10 , 0 );
1891+ return long_format (v , 10 );
19001892}
19011893
19021894static int
@@ -3255,13 +3247,13 @@ long_float(PyObject *v)
32553247static PyObject *
32563248long_oct (PyObject * v )
32573249{
3258- return long_format (v , 8 , 1 );
3250+ return long_format (v , 8 );
32593251}
32603252
32613253static PyObject *
32623254long_hex (PyObject * v )
32633255{
3264- return long_format (v , 16 , 1 );
3256+ return long_format (v , 16 );
32653257}
32663258
32673259static PyObject *
@@ -3407,7 +3399,7 @@ PyTypeObject PyLong_Type = {
34073399 0 , /* tp_as_mapping */
34083400 (hashfunc )long_hash , /* tp_hash */
34093401 0 , /* tp_call */
3410- long_str , /* tp_str */
3402+ 0 , /* tp_str */
34113403 PyObject_GenericGetAttr , /* tp_getattro */
34123404 0 , /* tp_setattro */
34133405 0 , /* tp_as_buffer */
0 commit comments