From: Tim Peters Date: Sat, 2 Mar 2002 04:14:21 +0000 (+0000) Subject: Revert the last odd change to PyNumber_Long: the problem it was trying X-Git-Tag: v2.3c1~6595 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=db30ac41de4e9e8412429720445ea4852c3c241f;p=python 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). --- diff --git a/Objects/abstract.c b/Objects/abstract.c index cae474c1d6..2acfd0865c 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