diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2015-03-10 22:35:24 +0100 |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2015-03-10 22:35:24 +0100 |
commit | 63afdaa1105de24e87658e82de314a37d341f02b (patch) | |
tree | f9795c023e2737feb82f974f351beff0b665d87d /Objects/typeobject.c | |
parent | 12541dc22ef3bbc2469b910eeb8daa4cd5675873 (diff) | |
parent | a654510150cb738b61033c32e30bd4be9f0ed6ed (diff) | |
download | cpython-git-63afdaa1105de24e87658e82de314a37d341f02b.tar.gz |
Issue #23629: Fix the default __sizeof__ implementation for variable-sized objects.
Diffstat (limited to 'Objects/typeobject.c')
-rw-r--r-- | Objects/typeobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c index be53868d93..030dc1f836 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -4276,7 +4276,7 @@ object_sizeof(PyObject *self, PyObject *args) res = 0; isize = self->ob_type->tp_itemsize; if (isize > 0) - res = Py_SIZE(self->ob_type) * isize; + res = Py_SIZE(self) * isize; res += self->ob_type->tp_basicsize; return PyLong_FromSsize_t(res); |