summaryrefslogtreecommitdiffstats
path: root/Python/sysmodule.c
diff options
context:
space:
mode:
authorHai Shi <shihai1992@gmail.com>2020-04-14 18:11:20 (GMT)
committerGitHub <noreply@github.com>2020-04-14 18:11:20 (GMT)
commit675d9a3d7afc767a2818c84da7ba4bf4181dcf26 (patch)
tree621da3f9078df542c36e8bb856c6d86da4ce52b0 /Python/sysmodule.c
parenta5900ecf9f22e65bef489633692e9ea6941379c5 (diff)
downloadcpython-675d9a3d7afc767a2818c84da7ba4bf4181dcf26.zip
cpython-675d9a3d7afc767a2818c84da7ba4bf4181dcf26.tar.gz
cpython-675d9a3d7afc767a2818c84da7ba4bf4181dcf26.tar.bz2
bpo-40170: Convert PyObject_IS_GC() macro to a function (GH-19464)
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r--Python/sysmodule.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index 79e5df0..741979a 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;
}