Commits

Maciej Fijalkowski committed 9c710fd

an experiment with secondary entrypoints

Comments (0)

Files changed (1)

pypy/objspace/std/embedding.py

 
+from pypy.rlib.entrypoint import entrypoint
 from pypy.rpython.lltypesystem import rffi, lltype
 from pypy.rpython.lltypesystem.lloperation import llop
-from pypy.interpreter.pyopcode import prepare_exec
-from pypy.interpreter.pycode import PyCode
 from pypy.interpreter.error import OperationError
-from pypy.interpreter import eval
 
 FUNCTIONS = {}
 
     return res
 
 def initialize(space):
-    for name, func in FUNCTIONS.iteritems():
-        pass
+    for name, (func, argtypes, restype) in FUNCTIONS.iteritems():
+        def newfunc(*args):
+            return func(space, *args)
+        deco = entrypoint("embedding", argtypes, 'pypy_' + name, relax=True)
+        deco(newfunc)