Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r742:6d502ec32dba Date: 2012-07-30 15:08 +0200 http://bitbucket.org/cffi/cffi/changeset/6d502ec32dba/
Log: Document with a versionchanged the changes. diff --git a/doc/source/index.rst b/doc/source/index.rst --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -702,6 +702,13 @@ argv = ffi.new("char *[]", argv_keepalive) +.. versionchanged:: 0.3 + + In older versions, passing a list as the ``char *[]`` argument did + not work; you needed to make a ``argv_keepalive`` and a ``argv`` + in all cases. + + Function calls -------------- @@ -953,13 +960,15 @@ | | | if out of range | | +---------------+------------------------+------------------+----------------+ -(*) 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...]]``. +.. versionchanged:: 0.3 + + (*) 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...]]``. 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 _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit