[Python-checkins] cpython (3.2): Add warning in ctypes documentation for #16575 and #16576

eli.bendersky python-checkins at python.org
Sat Mar 9 14:56:21 CET 2013


http://hg.python.org/cpython/rev/0acd9408b6f1
changeset:   82567:0acd9408b6f1
branch:      3.2
parent:      82554:55fd9810c9ab
user:        Eli Bendersky <eliben at gmail.com>
date:        Sat Mar 09 05:54:00 2013 -0800
summary:
  Add warning in ctypes documentation for #16575 and #16576

files:
  Doc/library/ctypes.rst |  7 +++++++
  1 files changed, 7 insertions(+), 0 deletions(-)


diff --git a/Doc/library/ctypes.rst b/Doc/library/ctypes.rst
--- a/Doc/library/ctypes.rst
+++ b/Doc/library/ctypes.rst
@@ -603,6 +603,13 @@
 
 .. _ctypes-structureunion-alignment-byte-order:
 
+.. warning::
+
+   :mod:`ctypes` does not support passing unions or structures with bit-fields
+   to functions by value.  While this may work on 32-bit x86, it's not
+   guaranteed by the library to work in the general case.  Unions and
+   structures with bit-fields should always be passed to functions by pointer.
+
 Structure/union alignment and byte order
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list