[Python-checkins] cpython (2.7): Add warning in ctypes documentation for #16575 and #16576
eli.bendersky
python-checkins at python.org
Sat Mar 9 14:57:31 CET 2013
http://hg.python.org/cpython/rev/eece32440a52
changeset: 82570:eece32440a52
branch: 2.7
parent: 82557:e0ef2bde35c3
user: Eli Bendersky <eliben at gmail.com>
date: Sat Mar 09 05:56:35 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
@@ -602,6 +602,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