[pypy-svn] r49022 - in pypy/branch/remove-extcompiler-rctypes/pypy/translator/c: . test

pedronis at codespeak.net pedronis at codespeak.net
Sat Nov 24 11:59:02 CET 2007


Author: pedronis
Date: Sat Nov 24 11:59:02 2007
New Revision: 49022

Modified:
   pypy/branch/remove-extcompiler-rctypes/pypy/translator/c/test/test_wrapper.py
   pypy/branch/remove-extcompiler-rctypes/pypy/translator/c/wrapper.py
Log:
(cfbolz, pedronis) oops



Modified: pypy/branch/remove-extcompiler-rctypes/pypy/translator/c/test/test_wrapper.py
==============================================================================
--- pypy/branch/remove-extcompiler-rctypes/pypy/translator/c/test/test_wrapper.py	(original)
+++ pypy/branch/remove-extcompiler-rctypes/pypy/translator/c/test/test_wrapper.py	Sat Nov 24 11:59:02 2007
@@ -3,7 +3,7 @@
 from pypy.translator.translator import TranslationContext
 from pypy.translator.c.wrapper import new_wrapper
 from pypy.rpython.rmodel import PyObjPtr
-from pypy.rpython.llinterp import LLInterpreter, LLException, log
+from pypy.rpython.llinterp import LLInterpreter
 from pypy.rpython.lltypesystem import lltype
 
 
@@ -23,7 +23,11 @@
         t.buildrtyper().specialize()
         wrapperptr = new_wrapper(func, t)
         wrappergraph = wrapperptr._obj.graph
-        for inputarg in wrappergraph.startblock.inputargs:
+        F = lltype.typeOf(wrapperptr).TO
+        assert F.ARGS == (PyObjPtr,) * len(wrappergraph.getargs())
+        assert F.RESULT == PyObjPtr
+
+        for inputarg in wrappergraph.getargs():
             assert inputarg.concretetype == PyObjPtr
         assert wrappergraph.getreturnvar().concretetype == PyObjPtr
         return t.graphs[0], wrappergraph, t

Modified: pypy/branch/remove-extcompiler-rctypes/pypy/translator/c/wrapper.py
==============================================================================
--- pypy/branch/remove-extcompiler-rctypes/pypy/translator/c/wrapper.py	(original)
+++ pypy/branch/remove-extcompiler-rctypes/pypy/translator/c/wrapper.py	Sat Nov 24 11:59:02 2007
@@ -258,9 +258,7 @@
     # that need to be specialized now
     translator.rtyper.specialize_more_blocks()
 
-    return functionptr(FuncType([PyObjPtr,
-                                 PyObjPtr,
-                                 PyObjPtr],
+    return functionptr(FuncType([PyObjPtr] * len(wrapper_inputargs),
                                 PyObjPtr),
                        wgraph.name,
                        graph = wgraph,



More information about the Pypy-commit mailing list