From a93c51e3a8e15f1a486d11d5b55a64f3381babe0 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 7 Feb 2020 00:38:59 +0100 Subject: bpo-39573: Use Py_REFCNT() macro (GH-18388) Replace direct acccess to PyObject.ob_refcnt with usage of the Py_REFCNT() macro. --- Python/sysmodule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Python/sysmodule.c') diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 1cb10300d7..d8d1874745 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -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 -- cgit v1.2.1