[pypy-svn] r9249 - pypy/branch/dist-interpapp/pypy/module/builtin
arigo at codespeak.net
arigo at codespeak.net
Wed Feb 16 16:27:58 CET 2005
Author: arigo
Date: Wed Feb 16 16:27:57 2005
New Revision: 9249
Modified:
pypy/branch/dist-interpapp/pypy/module/builtin/compiling.py
pypy/branch/dist-interpapp/pypy/module/builtin/importing.py
Log:
More missing imports; and fixed the unwrap_spec.
Modified: pypy/branch/dist-interpapp/pypy/module/builtin/compiling.py
==============================================================================
--- pypy/branch/dist-interpapp/pypy/module/builtin/compiling.py (original)
+++ pypy/branch/dist-interpapp/pypy/module/builtin/compiling.py Wed Feb 16 16:27:57 2005
@@ -2,6 +2,10 @@
Implementation of the interpreter-level compile/eval builtins.
"""
+from pypy.interpreter.pycode import PyCode
+from pypy.interpreter.baseobjspace import W_Root, ObjSpace
+from pypy.interpreter.gateway import NoneNotWrapped
+
def compile(space, w_str_, filename, startstr,
supplied_flags=0, dont_inherit=0):
if space.is_true(space.isinstance(w_str_, space.w_unicode)):
@@ -32,7 +36,7 @@
raise OperationError(space.w_TypeError,space.wrap(str(e)))
return space.wrap(PyCode(space)._from_code(c))
#
-compile.unwrap_spec = [W_Root,str,str,int,int]
+compile.unwrap_spec = [ObjSpace,W_Root,str,str,int,int]
def eval(space, w_source, w_globals=NoneNotWrapped, w_locals=NoneNotWrapped):
Modified: pypy/branch/dist-interpapp/pypy/module/builtin/importing.py
==============================================================================
--- pypy/branch/dist-interpapp/pypy/module/builtin/importing.py (original)
+++ pypy/branch/dist-interpapp/pypy/module/builtin/importing.py Wed Feb 16 16:27:57 2005
@@ -6,7 +6,7 @@
from pypy.interpreter.module import Module
from pypy.interpreter.error import OperationError
-from pypy.interpreter.baseobjspace import W_Root
+from pypy.interpreter.baseobjspace import W_Root, ObjSpace
# XXX this uses the os.path module at interp-level, which means
# XXX that translate_pypy will produce a translated version of
@@ -106,7 +106,7 @@
space.setitem(space.sys.w_modules, w(rel_modulename),space.w_None)
return w_mod
#
-importhook.unwrap_spec = [str,W_Root,W_Root,W_Root]
+importhook.unwrap_spec = [ObjSpace,str,W_Root,W_Root,W_Root]
def absolute_import(space, modulename, baselevel, w_fromlist, tentative):
w = space.wrap
More information about the Pypy-commit
mailing list