[pypy-svn] r12060 - pypy/dist/pypy/interpreter
arigo at codespeak.net
arigo at codespeak.net
Sun May 8 10:34:21 CEST 2005
Author: arigo
Date: Sun May 8 10:34:20 2005
New Revision: 12060
Modified:
pypy/dist/pypy/interpreter/lazymodule.py
Log:
Typecheck the objects built by the interpleveldef of lazy modules.
Modified: pypy/dist/pypy/interpreter/lazymodule.py
==============================================================================
--- pypy/dist/pypy/interpreter/lazymodule.py (original)
+++ pypy/dist/pypy/interpreter/lazymodule.py Sun May 8 10:34:20 2005
@@ -2,6 +2,7 @@
from pypy.interpreter.function import Function, BuiltinFunction
from pypy.interpreter import gateway
from pypy.interpreter.error import OperationError
+from pypy.interpreter.baseobjspace import W_Root
import inspect
@@ -102,7 +103,9 @@
#print spec, "->", value
if hasattr(value, 'func_code'): # semi-evil
return space.wrap(gateway.interp2app(value))
- assert value is not None
+ assert isinstance(value, W_Root), (
+ "interpleveldef %s.%s must return a wrapped object "
+ "(got %r instead)" % (pkgroot, spec, value))
return value
return ifileloader
More information about the Pypy-commit
mailing list