Author: Armin Rigo <ar...@tunes.org>
Branch: qualtypes
Changeset: r2288:32ca56181815
Date: 2015-09-30 12:25 +0200
http://bitbucket.org/cffi/cffi/changeset/32ca56181815/

Log:    Documentation

diff --git a/doc/source/cdef.rst b/doc/source/cdef.rst
--- a/doc/source/cdef.rst
+++ b/doc/source/cdef.rst
@@ -232,6 +232,15 @@
 ``TCHAR`` and friends where hard-coded as unicode, but ``UNICODE`` was,
 inconsistently, not defined by default.)
 
+Note that you can use the type-qualifiers ``const`` and ``restrict``
+(but not ``__restrict`` or ``__restrict__``) in the ``cdef()``, but
+this has no effect on the cdata objects that you get at run-time (they
+are never ``const``).  The effect is limited to knowing if a global
+variable is meant to be a constant or not.  Also, *new in version
+1.3:* when using ``set_source()`` or ``verify()``, these two
+qualifiers are copied from the cdef to the generated C code; this
+fixes warnings by the C compiler.
+
 
 .. _loading-libraries:
 
diff --git a/doc/source/whatsnew.rst b/doc/source/whatsnew.rst
--- a/doc/source/whatsnew.rst
+++ b/doc/source/whatsnew.rst
@@ -13,6 +13,12 @@
 * Issue #217: fix possible unaligned pointer manipulation, which crash
   on some architectures (64-bit, non-x86).
 
+* Issues #64 and #126: when using ``set_source()`` or ``verify()``,
+  the ``const`` and ``restrict`` keywords are copied from the cdef
+  to the generated C code; this fixes warnings by the C compiler.
+  It also fixes corner cases like ``typedef const int T; T a;``
+  which would previously not consider ``a`` as a constant.
+
 
 v1.2.1
 ======
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to