[pypy-svn] r11565 - pypy/dist/pypy/interpreter

hpk at codespeak.net hpk at codespeak.net
Thu Apr 28 13:37:02 CEST 2005

Author: hpk
Date: Thu Apr 28 13:37:02 2005
New Revision: 11565

make applevel.interphooks() notice early that there 
is a missing space argument. 

Modified: pypy/dist/pypy/interpreter/gateway.py
--- pypy/dist/pypy/interpreter/gateway.py	(original)
+++ pypy/dist/pypy/interpreter/gateway.py	Thu Apr 28 13:37:02 2005
@@ -13,7 +13,7 @@
 from pypy.interpreter.error import OperationError 
 from pypy.interpreter import eval
 from pypy.interpreter.function import Function, Method
-from pypy.interpreter.baseobjspace import W_Root,ObjSpace, BaseWrappable, Wrappable
+from pypy.interpreter.baseobjspace import W_Root, ObjSpace, BaseWrappable, Wrappable
 from pypy.interpreter.argument import Arguments
 from pypy.tool.cache import Cache 
 from pypy.tool.compile import compile2
@@ -548,6 +548,8 @@
     def interphook(self, name):
         def appcaller(space, *args_w):
+            if not isinstance(space, ObjSpace): 
+                raise TypeError("first argument must be a space instance.")
             args = Arguments(space, list(args_w))
             w_func = self.wget(space, name) 
             return space.call_args(w_func, args)

More information about the Pypy-commit mailing list