summaryrefslogtreecommitdiff
path: root/Objects/fileobject.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-02-07 00:38:59 +0100
committerGitHub <noreply@github.com>2020-02-07 00:38:59 +0100
commita93c51e3a8e15f1a486d11d5b55a64f3381babe0 (patch)
treea84997f6ca55cb27c92248dc04eda44e01a07a2a /Objects/fileobject.c
parent446463f8dbce0556be8020914f37089b63bb8ab6 (diff)
downloadcpython-git-a93c51e3a8e15f1a486d11d5b55a64f3381babe0.tar.gz
bpo-39573: Use Py_REFCNT() macro (GH-18388)
Replace direct acccess to PyObject.ob_refcnt with usage of the Py_REFCNT() macro.
Diffstat (limited to 'Objects/fileobject.c')
-rw-r--r--Objects/fileobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/fileobject.c b/Objects/fileobject.c
index 527693c809..c0eff8bed5 100644
--- a/Objects/fileobject.c
+++ b/Objects/fileobject.c
@@ -85,7 +85,7 @@ PyFile_GetLine(PyObject *f, int n)
"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;