From fbe94c55ca482bc30a831f8319bdc2074124a4e3 Mon Sep 17 00:00:00 2001 From: Robert Schuppenies Date: Mon, 14 Jul 2008 10:13:31 +0000 Subject: Merged revisions 64842,64853,64856,64945 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r64842 | robert.schuppenies | 2008-07-10 15:43:26 +0200 (Thu, 10 Jul 2008) | 2 lines Fixed Issue3122 and extended sys.getsizeof tests for built-in types. ........ r64853 | robert.schuppenies | 2008-07-10 17:24:04 +0200 (Thu, 10 Jul 2008) | 3 lines Added additional __sizeof__ implementations and addressed comments made in Issue3122. ........ r64856 | robert.schuppenies | 2008-07-10 19:13:55 +0200 (Thu, 10 Jul 2008) | 3 lines Added garbage collector overhead and optional default return value to sys.getsizeof. ........ r64945 | robert.schuppenies | 2008-07-14 10:42:18 +0200 (Mon, 14 Jul 2008) | 2 lines Fixed test failure on Win64 machines. ........ --- Objects/longobject.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'Objects/longobject.c') diff --git a/Objects/longobject.c b/Objects/longobject.c index 2c684cbea5..6cea51a284 100644 --- a/Objects/longobject.c +++ b/Objects/longobject.c @@ -3638,9 +3638,7 @@ long_sizeof(PyLongObject *v) { Py_ssize_t res; - res = sizeof(PyLongObject) + abs(Py_SIZE(v)) * sizeof(digit); - if (Py_SIZE(v) != 0) - res -= sizeof(digit); + res = sizeof(PyVarObject) + abs(Py_SIZE(v))*sizeof(digit); return PyLong_FromSsize_t(res); } -- cgit v1.2.1