diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2015-03-10 22:32:00 +0100 |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2015-03-10 22:32:00 +0100 |
commit | a654510150cb738b61033c32e30bd4be9f0ed6ed (patch) | |
tree | 78cc513f9f908489c3345a782e1bbe2090e8209e /Objects/typeobject.c | |
parent | ebb8c2d528e07df71c345826fc1290327b1e369e (diff) | |
download | cpython-git-a654510150cb738b61033c32e30bd4be9f0ed6ed.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 482a7a5267..cf58911209 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -4258,7 +4258,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); |