Author: Armin Rigo <ar...@tunes.org> Branch: cffi-1.0 Changeset: r77267:f1a756ab424b Date: 2015-05-09 23:25 +0200 http://bitbucket.org/pypy/pypy/changeset/f1a756ab424b/
Log: Translation fix diff --git a/pypy/module/_cffi_backend/structwrapper.py b/pypy/module/_cffi_backend/structwrapper.py --- a/pypy/module/_cffi_backend/structwrapper.py +++ b/pypy/module/_cffi_backend/structwrapper.py @@ -3,7 +3,9 @@ from pypy.interpreter.gateway import interp2app from rpython.rlib import jit +from pypy.module._cffi_backend.cdataobj import W_CData from pypy.module._cffi_backend.cdataobj import W_CDataPtrToStructOrUnion +from pypy.module._cffi_backend.ctypeptr import W_CTypePtrOrArray from pypy.module._cffi_backend.ctypefunc import W_CTypeFunc from pypy.module._cffi_backend.ctypestruct import W_CTypeStructOrUnion @@ -45,8 +47,8 @@ continue w_arg = args_w[i] farg = self.fargs[i] # <ptr to struct/union> - if (isinstance(w_arg, W_CTypeStructOrUnion) and - w_arg.ctype is farg.ctitem): + assert isinstance(farg, W_CTypePtrOrArray) + if isinstance(w_arg, W_CData) and w_arg.ctype is farg.ctitem: # fast way: just make a new W_CData of ctype "ptr to struct" # which points to the same raw memory as the existing W_CData # of ctype "struct" _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit