[Python-checkins] cpython (merge 3.3 -> default): Add warning in ctypes documentation for #16575 and #16576

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


http://hg.python.org/cpython/rev/502624235c7b
changeset: 82569:502624235c7b
parent: 82566:d0fcb4c9f231
parent: 82568:bfc159f8e4b4
user: Eli Bendersky <eliben at gmail.com>
date: Sat Mar 09 05:55:24 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
@@ -608,6 +608,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

AltStyle によって変換されたページ (->オリジナル) /