[pypy-svn] r46044 - pypy/branch/pypy-more-rtti-inprogress/rpython/tool

simonb at codespeak.net simonb at codespeak.net
Mon Aug 27 17:51:39 CEST 2007


Author: simonb
Date: Mon Aug 27 17:51:38 2007
New Revision: 46044

Modified:
   pypy/branch/pypy-more-rtti-inprogress/rpython/tool/genrffi.py
Log:
wrapper is now in llexternal

Modified: pypy/branch/pypy-more-rtti-inprogress/rpython/tool/genrffi.py
==============================================================================
--- pypy/branch/pypy-more-rtti-inprogress/rpython/tool/genrffi.py	(original)
+++ pypy/branch/pypy-more-rtti-inprogress/rpython/tool/genrffi.py	Mon Aug 27 17:51:38 2007
@@ -37,21 +37,6 @@
 }
 
 
-def softwrapper(funcptr, arg_tps):
-    # Here we wrap with a function that does some simple type coercion.
-    unrolling_arg_tps = unrolling_iterable(enumerate(arg_tps))
-    def softfunc(*args):
-        real_args = ()
-        for i, tp in unrolling_arg_tps:
-            if tp == rffi.lltype.Float:
-                real_args = real_args + (float(args[i]),)
-            else:
-                real_args = real_args + (args[i],)
-        result = funcptr(*real_args)
-        return result
-    return softfunc
-
-
 class RffiBuilder(object):
     def __init__(self, ns=None, includes=[], libraries=[], include_dirs=[]):
         if ns is None:
@@ -105,9 +90,8 @@
             self.proc_tp(func.restype), 
             includes=self.includes, libraries=self.libraries, 
             include_dirs=self.include_dirs)
-        soft = softwrapper(ll_item, arg_tps)
-        self.ns[name] = soft
-        return soft
+        self.ns[name] = ll_item
+        return ll_item
 
     def proc_namespace(self, ns):
         exempt = set(id(value) for value in ctypes.__dict__.values())



More information about the Pypy-commit mailing list