[pypy-commit] pypy default: backout 62f4648aed86

arigo noreply at buildbot.pypy.org
Tue Sep 2 15:42:25 CEST 2014


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r73281:b7ef31a82744
Date: 2014-09-02 15:41 +0200
http://bitbucket.org/pypy/pypy/changeset/b7ef31a82744/

Log:	backout 62f4648aed86

	add an explanation and a link to the full commit for why

diff --git a/rpython/rlib/rfile.py b/rpython/rlib/rfile.py
--- a/rpython/rlib/rfile.py
+++ b/rpython/rlib/rfile.py
@@ -60,8 +60,11 @@
 c_setvbuf = llexternal('setvbuf', [FILEP, rffi.CCHARP, rffi.INT, rffi.SIZE_T],
                        rffi.INT)
 
-c_fclose = llexternal('fclose', [FILEP], rffi.INT)
-c_pclose = llexternal('pclose', [FILEP], rffi.INT)
+# Note: the following two functions are called from __del__ methods,
+# so must be 'releasegil=False'.  Otherwise, a program using both
+# threads and the RFile class cannot translate.  See c684bf704d1f
+c_fclose = llexternal('fclose', [FILEP], rffi.INT, releasegil=False)
+c_pclose = llexternal('pclose', [FILEP], rffi.INT, releasegil=False)
 
 c_getc = llexternal('getc', [FILEP], rffi.INT, macro=True)
 c_fgets = llexternal('fgets', [rffi.CCHARP, rffi.INT, FILEP], rffi.CCHARP)


More information about the pypy-commit mailing list