summaryrefslogtreecommitdiff
path: root/Objects/longobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/longobject.c')
-rw-r--r--Objects/longobject.c4
1 files changed, 1 insertions, 3 deletions
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);
}