summaryrefslogtreecommitdiffstats
path: root/Python/sysmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r--Python/sysmodule.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index 13fae79..af4f926 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -1681,10 +1681,7 @@ _PySys_GetSizeOf(PyObject *o)
return (size_t)-1;
}
- /* add gc_head size */
- if (_PyObject_IS_GC(o))
- return ((size_t)size) + sizeof(PyGC_Head);
- return (size_t)size;
+ return (size_t)size + _PyType_PreHeaderSize(Py_TYPE(o));
}
static PyObject *