[pypy-commit] pypy less-stringly-ops: fix translation of open() and os.tmpfile()

rlamy noreply at buildbot.pypy.org
Fri Nov 22 00:02:44 CET 2013


Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: less-stringly-ops
Changeset: r68278:8c558fb814b7
Date: 2013-11-21 23:58 +0100
http://bitbucket.org/pypy/pypy/changeset/8c558fb814b7/

Log:	fix translation of open() and os.tmpfile()

diff --git a/rpython/flowspace/specialcase.py b/rpython/flowspace/specialcase.py
--- a/rpython/flowspace/specialcase.py
+++ b/rpython/flowspace/specialcase.py
@@ -47,14 +47,12 @@
 @register_flow_sc(open)
 def sc_open(space, *args_w):
     from rpython.rlib.rfile import create_file
-
-    return space.frame.do_operation("simple_call", const(create_file), *args_w)
+    return space.appcall(create_file, *args_w)
 
 @register_flow_sc(os.tmpfile)
 def sc_os_tmpfile(space):
     from rpython.rlib.rfile import create_temp_rfile
-
-    return space.frame.do_operation("simple_call", const(create_temp_rfile))
+    return space.appcall(create_temp_rfile)
 
 # _________________________________________________________________________
 # a simplified version of the basic printing routines, for RPython programs


More information about the pypy-commit mailing list