mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
bpo-40170: Convert PyObject_IS_GC() macro to a function (GH-19464)
This commit is contained in:
parent
a5900ecf9f
commit
675d9a3d7a
7 changed files with 41 additions and 15 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue