[pypy-commit] pypy use-file-star-for-file: cleanup

bdkearns noreply at buildbot.pypy.org
Thu Sep 11 19:49:02 CEST 2014


Author: Brian Kearns <bdkearns at gmail.com>
Branch: use-file-star-for-file
Changeset: r73463:ba680c1a8f5a
Date: 2014-09-11 11:57 -0400
http://bitbucket.org/pypy/pypy/changeset/ba680c1a8f5a/

Log:	cleanup

diff --git a/rpython/rlib/rfile.py b/rpython/rlib/rfile.py
--- a/rpython/rlib/rfile.py
+++ b/rpython/rlib/rfile.py
@@ -269,9 +269,6 @@
             if self._setbuf:
                 lltype.free(self._setbuf, flavor='raw')
 
-    def _cleanup_(self):
-        self._ll_file = lltype.nullptr(FILEP.TO)
-
     def close(self):
         """Closes the described file.
 
@@ -297,6 +294,9 @@
                     self._setbuf = lltype.nullptr(rffi.CCHARP.TO)
         return res
 
+    def _cleanup_(self):
+        self._ll_file = lltype.nullptr(FILEP.TO)
+
     def _check_closed(self):
         if not self._ll_file:
             raise ValueError("I/O operation on closed file")


More information about the pypy-commit mailing list