[pypy-commit] cffi default: Another attempt at saying "a pointer to anything is fine", with bold
arigo
noreply at buildbot.pypy.org
Sun Aug 26 12:14:34 CEST 2012
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r897:cb388b8b1640
Date: 2012-08-26 12:14 +0200
http://bitbucket.org/cffi/cffi/changeset/cb388b8b1640/
Log: Another attempt at saying "a pointer to anything is fine", with bold
text this time.
diff --git a/doc/source/index.rst b/doc/source/index.rst
--- a/doc/source/index.rst
+++ b/doc/source/index.rst
@@ -801,11 +801,12 @@
>>> lib.function_returning_a_struct()
<cdata 'struct foo_s' owning 8 bytes>
-There are a few (obscure) limitations to the argument types and
-return type. You cannot pass directly as argument a union, nor a struct
-which uses bitfields (note that passing a *pointer* to anything is
-fine). If you pass a struct, the struct type cannot have been declared
-with "``...;``" and completed with ``verify()``; you need to declare it
+There are a few (obscure) limitations to the argument types and return
+type. You cannot pass directly as argument a union (but a **pointer**
+to a union is fine), nor a struct which uses bitfields (but a
+**pointer** to such a struct is fine). If you pass a struct (not a
+**pointer** to a struct), the struct type cannot have been declared with
+"``...;``" and completed with ``verify()``; you need to declare it
completely in ``cdef()``.
Aside from these limitations, functions and callbacks can return structs.
More information about the pypy-commit
mailing list