Add warning in ctypes documentation for #16575 and #16576
authorEli Bendersky <eliben@gmail.com>
Sat, 9 Mar 2013 13:56:35 +0000 (05:56 -0800)
committerEli Bendersky <eliben@gmail.com>
Sat, 9 Mar 2013 13:56:35 +0000 (05:56 -0800)
Doc/library/ctypes.rst

index 7f62e30561ebf7d89e317a12550ccb2a81494511..c72a0b5a4edac3fb3a70a5d63452a7189e5d044a 100644 (file)
@@ -602,6 +602,13 @@ for debugging because they can provide useful information::
 
 .. _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
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^