summaryrefslogtreecommitdiffstats
path: root/Objects/abstract.c
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2002-03-02 04:14:21 (GMT)
committerTim Peters <tim.peters@gmail.com>2002-03-02 04:14:21 (GMT)
commitdb30ac41de4e9e8412429720445ea4852c3c241f (patch)
treeb16c31bd0bdf45996ef0066d31349421171052c0 /Objects/abstract.c
parentffd05ee90de2b2c0d5a429159b155c7a63552170 (diff)
downloadcpython-db30ac41de4e9e8412429720445ea4852c3c241f.zip
cpython-db30ac41de4e9e8412429720445ea4852c3c241f.tar.gz
cpython-db30ac41de4e9e8412429720445ea4852c3c241f.tar.bz2
Revert the last odd change to PyNumber_Long: the problem it was trying
to fix was almost certainly a bug in _PyLong_Copy (which I'll fix next).
Diffstat (limited to 'Objects/abstract.c')
-rw-r--r--Objects/abstract.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c
index cae474c..2acfd08 100644
--- a/Objects/abstract.c
+++ b/Objects/abstract.c
@@ -933,16 +933,8 @@ PyNumber_Long(PyObject *o)
Py_INCREF(o);
return o;
}
- if (PyLong_Check(o)) {
- PyObject *res;
-
- res = _PyLong_Copy((PyLongObject *)o);
- if (res != NULL)
- ((PyLongObject *)res)->ob_size =
- ((PyLongObject *)o)->ob_size;
-
- return res;
- }
+ if (PyLong_Check(o))
+ return _PyLong_Copy((PyLongObject *)o);
if (PyString_Check(o))
/* need to do extra error checking that PyLong_FromString()
* doesn't do. In particular long('9.5') must raise an