[pypy-commit] pypy ffi-backend: 'type[]' function arguments must be replaced early with 'type*'.

arigo noreply at buildbot.pypy.org
Wed Jul 4 05:16:09 CEST 2012


Author: Armin Rigo <arigo at tunes.org>
Branch: ffi-backend
Changeset: r55912:ae14a4a360fc
Date: 2012-07-04 05:13 +0200
http://bitbucket.org/pypy/pypy/changeset/ae14a4a360fc/

Log:	'type[]' function arguments must be replaced early with 'type*'.

diff --git a/pypy/module/_cffi_backend/newtype.py b/pypy/module/_cffi_backend/newtype.py
--- a/pypy/module/_cffi_backend/newtype.py
+++ b/pypy/module/_cffi_backend/newtype.py
@@ -217,6 +217,8 @@
         if not isinstance(farg, ctypeobj.W_CType):
             raise OperationError(space.w_TypeError,
                 space.wrap("first arg must be a tuple of ctype objects"))
+        if isinstance(farg, ctypearray.W_CTypeArray):
+            farg = farg.ctptr
         fargs.append(farg)
     #
     if isinstance(fresult, ctypestruct.W_CTypeStructOrUnion):


More information about the pypy-commit mailing list