bpo-40170: Convert PyObject_IS_GC() macro to a function (GH-19464)

This commit is contained in:
Hai Shi 2020-04-15 02:11:20 +08:00 committed by GitHub
parent a5900ecf9f
commit 675d9a3d7a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 41 additions and 15 deletions

View file

@ -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;
}