[pypy-commit] cffi default: Mention more clearly that p.x and p->x in C become the same thing in Python.

arigo noreply at buildbot.pypy.org
Sun Jun 17 17:33:29 CEST 2012


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r410:495daf2ca4a5
Date: 2012-06-17 17:33 +0200
http://bitbucket.org/cffi/cffi/changeset/495daf2ca4a5/

Log:	Mention more clearly that p.x and p->x in C become the same thing in
	Python.

diff --git a/doc/source/index.rst b/doc/source/index.rst
--- a/doc/source/index.rst
+++ b/doc/source/index.rst
@@ -361,8 +361,9 @@
 read or write from pointers, arrays and structures.  Dereferencing a
 pointer is done usually in C with the syntax ``*p``, which is not valid
 Python, so instead you have to use the alternative syntax ``p[0]``
-(which is also valid C).  Additionally, the ``p->x`` syntax in C becomes
-``p.x`` in Python.  And instead of ``NULL`` you use None.
+(which is also valid C).  Additionally, the ``p.x`` and ``p->x``
+syntaxes in C both become ``p.x`` in Python.  And instead of ``NULL``
+you use None.
 
 There is no equivalent to the ``&`` operator in C (because it would not
 fit nicely in the model, and it does not seem to be needed here).


More information about the pypy-commit mailing list