[pypy-commit] cffi default: More explanation

arigo noreply at buildbot.pypy.org
Mon Jul 30 15:14:15 CEST 2012


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r745:2ee19e5cc285
Date: 2012-07-30 15:14 +0200
http://bitbucket.org/cffi/cffi/changeset/2ee19e5cc285/

Log:	More explanation

diff --git a/doc/source/index.rst b/doc/source/index.rst
--- a/doc/source/index.rst
+++ b/doc/source/index.rst
@@ -963,10 +963,11 @@
    (*) Note that when calling a function, as per C, a ``item *`` argument
    is identical to a ``item[]`` argument.  So you can pass an argument that
    is accepted by either C type, like for example passing a Python string
-   to a ``char *`` argument or a list of integers to a ``int *`` argument.
-   Note that even if you want to pass a single ``item``, you need to specify
-   it in a list of length 1; for example, a ``struct foo *`` argument might
-   be passed as ``[[field1, field2...]]``.
+   to a ``char *`` argument (because it works for ``char[]`` arguments)
+   or a list of integers to a ``int *`` argument (it works for ``int[]``
+   arguments).  Note that even if you want to pass a single ``item``,
+   you need to specify it in a list of length 1; for example, a ``struct
+   foo *`` argument might be passed as ``[[field1, field2...]]``.
 
 As an optimization, the CPython version of CFFI assumes that a function
 with a ``char *`` argument to which you pass a Python string will not


More information about the pypy-commit mailing list