summaryrefslogtreecommitdiffstats
path: root/Objects/fileobject.c
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2017-09-14 04:20:29 (GMT)
committerGitHub <noreply@github.com>2017-09-14 04:20:29 (GMT)
commita72d15c97f9837f6c9c6bd476a62175c942cc588 (patch)
tree104b0a1b090a9743e3efcdeae924c3ac9e306f12 /Objects/fileobject.c
parent860839cc8e0a4a0890418f77c984955697f96828 (diff)
downloadcpython-a72d15c97f9837f6c9c6bd476a62175c942cc588.zip
cpython-a72d15c97f9837f6c9c6bd476a62175c942cc588.tar.gz
cpython-a72d15c97f9837f6c9c6bd476a62175c942cc588.tar.bz2
consistently use Py_TYPE, Py_REFCNT, and correct initializer macros (#3563)
This no-op change makes 2.7 more consistent with 3.x to ease comparison and backports.
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 a7d64ba..7e07a53 100644
--- a/Objects/fileobject.c
+++ b/Objects/fileobject.c
@@ -427,7 +427,7 @@ close_the_file(PyFileObject *f)
if (local_fp != NULL) {
local_close = f->f_close;
if (local_close != NULL && f->unlocked_count > 0) {
- if (f->ob_refcnt > 0) {
+ if (Py_REFCNT(f) > 0) {
PyErr_SetString(PyExc_IOError,
"close() called during concurrent "
"operation on the same file object.");