[pypy-svn] r10639 - in pypy/dist/pypy: interpreter module/sys2 translator
pedronis at codespeak.net
pedronis at codespeak.net
Thu Apr 14 20:55:01 CEST 2005
Author: pedronis
Date: Thu Apr 14 20:55:00 2005
New Revision: 10639
Modified:
pypy/dist/pypy/interpreter/module.py
pypy/dist/pypy/module/sys2/__init__.py
pypy/dist/pypy/translator/ann_override.py
Log:
fix wrap_exception_cls override
use Module.__init__ directly in module __new__ (avoids subclasses __init__ that are NOT_RPYTHON and not indented
to be called at runtime)
sys2.__init__.Module.__init__ is NOT_RPYTHON
Modified: pypy/dist/pypy/interpreter/module.py
==============================================================================
--- pypy/dist/pypy/interpreter/module.py (original)
+++ pypy/dist/pypy/interpreter/module.py Thu Apr 14 20:55:00 2005
@@ -22,7 +22,7 @@
def descr_module__new__(space, w_subtype, __args__):
module = space.allocate_instance(Module, w_subtype)
- module.__init__(space, space.wrap('?'))
+ Module.__init__(module, space, space.wrap('?'))
return space.wrap(module)
def descr_module__init__(self, w_name, w_doc=None):
Modified: pypy/dist/pypy/module/sys2/__init__.py
==============================================================================
--- pypy/dist/pypy/module/sys2/__init__.py (original)
+++ pypy/dist/pypy/module/sys2/__init__.py Thu Apr 14 20:55:00 2005
@@ -3,7 +3,8 @@
class Module(LazyModule):
"""Sys Builtin Module. """
- def __init__(self, space, w_name):
+ def __init__(self, space, w_name):
+ """NOT_RPYTHON""" # because parent __init__ isn't
super(Module, self).__init__(space, w_name)
self.checkinterval = 100
self.recursionlimit = 100
Modified: pypy/dist/pypy/translator/ann_override.py
==============================================================================
--- pypy/dist/pypy/translator/ann_override.py (original)
+++ pypy/dist/pypy/translator/ann_override.py Thu Apr 14 20:55:00 2005
@@ -20,8 +20,8 @@
clsdef = getbookkeeper().getclassdef(itypedef.W_Root)
return annmodel.SomeInstance(clsdef)
-def wrap_exception_cls(x):
- import pypy.std.objspace.std.typeobject as typeobject
+def wrap_exception_cls(space, x):
+ import pypy.objspace.std.typeobject as typeobject
clsdef = getbookkeeper().getclassdef(typeobject.W_TypeObject)
return annmodel.SomeInstance(clsdef, can_be_None=True)
More information about the Pypy-commit
mailing list