[pypy-commit] pypy use-file-star-for-file: rfile unlocked_count not needed
bdkearns
noreply at buildbot.pypy.org
Wed Sep 17 17:56:16 CEST 2014
Author: Brian Kearns <bdkearns at gmail.com>
Branch: use-file-star-for-file
Changeset: r73578:1acef6fb809c
Date: 2014-09-17 01:54 -0400
http://bitbucket.org/pypy/pypy/changeset/1acef6fb809c/
Log: rfile unlocked_count not needed
diff --git a/rpython/rlib/rfile.py b/rpython/rlib/rfile.py
--- a/rpython/rlib/rfile.py
+++ b/rpython/rlib/rfile.py
@@ -243,7 +243,6 @@
class RFile(object):
- _unlocked_count = 0
_signal_checker = None
_readable = True
_writable = True
@@ -309,9 +308,6 @@
if ll_file:
# double close is allowed
do_close = self._close2[0]
- if do_close and self._unlocked_count > 0:
- raise IOError("close() called during concurrent "
- "operation on the same file object.")
self._ll_file = lltype.nullptr(FILEP.TO)
try:
if do_close:
@@ -507,7 +503,6 @@
i = state[0]
c = state[1]
- self._unlocked_count += 1
before = rffi.aroundstate.before
if before: before()
c_flockfile(ll_file)
@@ -554,7 +549,6 @@
c_funlockfile(ll_file)
after = rffi.aroundstate.after
if after: after()
- self._unlocked_count -= 1
state[0] = i
state[1] = c
More information about the pypy-commit
mailing list