diff options
| author | Tim Peters <tim.peters@gmail.com> | 2002-03-02 04:14:21 +0000 |
|---|---|---|
| committer | Tim Peters <tim.peters@gmail.com> | 2002-03-02 04:14:21 +0000 |
| commit | 1ab4bba57a0dee76ac5fce16e6e86f89138e866c (patch) | |
| tree | 6f1a5b8aaaf1448dd317a48fdc24ee2c051734c8 | |
| parent | 98cce8219ab8ec6e90e686c32fdcfa2250a026ce (diff) | |
| download | cpython-1ab4bba57a0dee76ac5fce16e6e86f89138e866c.tar.gz | |
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).
| -rw-r--r-- | Objects/abstract.c | 12 |
1 files changed, 2 insertions, 10 deletions
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 |
