[pypy-svn] rev 525 - pypy/trunk/src/pypy/interpreter
pedronis at codespeak.net
pedronis at codespeak.net
Tue May 27 12:55:22 CEST 2003
Author: pedronis
Date: Tue May 27 12:55:22 2003
New Revision: 525
Modified:
pypy/trunk/src/pypy/interpreter/extmodule.py
Log:
let's have separate support for app level hidden app level helper functions for
implementing extmodule.
set __apphelperfile__ to an AppFile
call function defined in it through self.callhelp
Modified: pypy/trunk/src/pypy/interpreter/extmodule.py
==============================================================================
--- pypy/trunk/src/pypy/interpreter/extmodule.py (original)
+++ pypy/trunk/src/pypy/interpreter/extmodule.py Tue May 27 12:55:22 2003
@@ -47,10 +47,13 @@
class BuiltinModule:
__appfile__ = None
+ __apphelperfile__ = None
def __init__(self, space):
self.space = space
-
+ if self.__apphelperfile__ is not None:
+ self._helper = AppHelper(self.space, self.__apphelperfile__)
+
def wrap_me(self):
space = self.space
modulename = self.__pythonname__
@@ -68,3 +71,7 @@
w_dict = space.getattr(w_module, space.wrap("__dict__"))
appfile.AppHelper(space, sappfile, w_dict)
return w_module
+
+ def callhelp(functioname,argslist):
+ self._helper.call(functioname,argslist)
+
More information about the Pypy-commit
mailing list