commit | a93c51e3a8e15f1a486d11d5b55a64f3381babe0 | [log] [tgz] |
---|---|---|
author | Victor Stinner <vstinner@python.org> | Fri Feb 07 00:38:59 2020 +0100 |
committer | GitHub <noreply@github.com> | Fri Feb 07 00:38:59 2020 +0100 |
tree | a84997f6ca55cb27c92248dc04eda44e01a07a2a | |
parent | 446463f8dbce0556be8020914f37089b63bb8ab6 [diff] [blame] |
bpo-39573: Use Py_REFCNT() macro (GH-18388) Replace direct acccess to PyObject.ob_refcnt with usage of the Py_REFCNT() macro.
diff --git a/Objects/fileobject.c b/Objects/fileobject.c index 527693c..c0eff8b 100644 --- a/Objects/fileobject.c +++ b/Objects/fileobject.c
@@ -85,7 +85,7 @@ "EOF when reading a line"); } else if (s[len-1] == '\n') { - if (result->ob_refcnt == 1) + if (Py_REFCNT(result) == 1) _PyBytes_Resize(&result, len-1); else { PyObject *v;