Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r83406:4349150d3ab1
Date: 2016-03-27 22:58 +0200
http://bitbucket.org/pypy/pypy/changeset/4349150d3ab1/

Log:    Backed out changeset 76d5c1f7ff72

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
@@ -392,15 +391,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',
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to