From 675d9a3d7afc767a2818c84da7ba4bf4181dcf26 Mon Sep 17 00:00:00 2001 From: Hai Shi Date: Wed, 15 Apr 2020 02:11:20 +0800 Subject: bpo-40170: Convert PyObject_IS_GC() macro to a function (GH-19464) --- Python/sysmodule.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Python/sysmodule.c') diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 79e5df06d3..741979a09a 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -19,6 +19,7 @@ Data members: #include "frameobject.h" #include "pycore_ceval.h" // _Py_RecursionLimitLowerWaterMark() #include "pycore_initconfig.h" +#include "pycore_object.h" #include "pycore_pathconfig.h" #include "pycore_pyerrors.h" #include "pycore_pylifecycle.h" @@ -1679,7 +1680,7 @@ _PySys_GetSizeOf(PyObject *o) } /* add gc_head size */ - if (PyObject_IS_GC(o)) + if (_PyObject_IS_GC(o)) return ((size_t)size) + sizeof(PyGC_Head); return (size_t)size; } -- cgit v1.2.1