bpo-39573: Use Py_REFCNT() macro (GH-18388)

Replace direct acccess to PyObject.ob_refcnt with usage of the
Py_REFCNT() macro.
This commit is contained in:
Victor Stinner
2020-02-07 00:38:59 +01:00
committed by GitHub
parent 446463f8db
commit a93c51e3a8
9 changed files with 42 additions and 38 deletions

View File

@@ -1656,7 +1656,7 @@ static Py_ssize_t
sys_getrefcount_impl(PyObject *module, PyObject *object)
/*[clinic end generated code: output=5fd477f2264b85b2 input=bf474efd50a21535]*/
{
return object->ob_refcnt;
return Py_REFCNT(object);
}
#ifdef Py_REF_DEBUG