summaryrefslogtreecommitdiffstats
path: root/Objects/codeobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/codeobject.c')
-rw-r--r--Objects/codeobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/codeobject.c b/Objects/codeobject.c
index 353f414..b0e3446 100644
--- a/Objects/codeobject.c
+++ b/Objects/codeobject.c
@@ -384,7 +384,7 @@ code_sizeof(PyCodeObject *co, void *unused)
{
Py_ssize_t res;
- res = sizeof(PyCodeObject);
+ res = _PyObject_SIZE(Py_TYPE(co));
if (co->co_cell2arg != NULL && co->co_cellvars != NULL)
res += PyTuple_GET_SIZE(co->co_cellvars) * sizeof(unsigned char);
return PyLong_FromSsize_t(res);