[pypy-commit] pypy release-5.x: Backed out changeset c71f672e9491

arigo pypy.commits at gmail.com
Sun Mar 27 16:59:44 EDT 2016


Author: Armin Rigo <arigo at tunes.org>
Branch: release-5.x
Changeset: r83407:dec2ab0ea59c
Date: 2016-03-27 22:58 +0200
http://bitbucket.org/pypy/pypy/changeset/dec2ab0ea59c/

Log:	Backed out changeset c71f672e9491

diff --git a/rpython/rlib/rposix.py b/rpython/rlib/rposix.py
--- a/rpython/rlib/rposix.py
+++ b/rpython/rlib/rposix.py
@@ -10,8 +10,7 @@
     _CYGWIN, _MACRO_ON_POSIX, UNDERSCORE_ON_WIN32, _WIN32,
     _prefer_unicode, _preferred_traits)
 from rpython.rlib.objectmodel import (
-    specialize, enforceargs, register_replacement_for, NOT_CONSTANT,
-    we_are_translated)
+    specialize, enforceargs, register_replacement_for, NOT_CONSTANT)
 from rpython.rlib.rarithmetic import intmask, widen
 from rpython.rlib.signature import signature
 from rpython.tool.sourcetools import func_renamer
@@ -376,15 +375,8 @@
 def open(path, flags, mode):
     if _prefer_unicode(path):
         fd = c_wopen(_as_unicode0(path), flags, mode)
-    elif we_are_translated():
+    else:
         fd = c_open(_as_bytes0(path), flags, mode)
-    else:
-        # Untranslated, we can't reliably call c_open()
-        # because its precise signature is (char*, int, ...)
-        # but we're pretending it is (char*, int, mode_t).
-        # Usually it makes no difference, but on some
-        # platforms it does.
-        fd = os.open(_as_bytes0(path), flags, mode)
     return handle_posix_error('open', fd)
 
 c_read = external(UNDERSCORE_ON_WIN32 + 'read',


More information about the pypy-commit mailing list