summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorEli Bendersky <eliben@gmail.com>2013-03-09 13:54:00 (GMT)
committerEli Bendersky <eliben@gmail.com>2013-03-09 13:54:00 (GMT)
commit490cf4472ec1d5ce70f7e4817b47c392f22d579c (patch)
tree856f1d70ce7591ce83dbe38b0c005afde14d1416 /Doc
parent9cbcc2f1c05bbb5e58b9219d0006b80b408c28f1 (diff)
downloadcpython-490cf4472ec1d5ce70f7e4817b47c392f22d579c.zip
cpython-490cf4472ec1d5ce70f7e4817b47c392f22d579c.tar.gz
cpython-490cf4472ec1d5ce70f7e4817b47c392f22d579c.tar.bz2
Add warning in ctypes documentation for #16575 and #16576
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/ctypes.rst7
1 files changed, 7 insertions, 0 deletions
diff --git a/Doc/library/ctypes.rst b/Doc/library/ctypes.rst
index 486c963..6f093fe 100644
--- a/Doc/library/ctypes.rst
+++ b/Doc/library/ctypes.rst
@@ -603,6 +603,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
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^