diff options
author | Eli Bendersky <eliben@gmail.com> | 2013-03-09 05:56:35 -0800 |
---|---|---|
committer | Eli Bendersky <eliben@gmail.com> | 2013-03-09 05:56:35 -0800 |
commit | 26e2faf57da5e1c26f7ea25e5a1cb066ad7020cb (patch) | |
tree | ce291c37ae1e944ecaf2fff42e3cd431cdaf816c | |
parent | 9f7e247a8852a12a9c83b599c31b69d1baf5abd1 (diff) | |
download | cpython-git-26e2faf57da5e1c26f7ea25e5a1cb066ad7020cb.tar.gz |
Add warning in ctypes documentation for #16575 and #16576
-rw-r--r-- | Doc/library/ctypes.rst | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Doc/library/ctypes.rst b/Doc/library/ctypes.rst index 7f62e30561..c72a0b5a4e 100644 --- a/Doc/library/ctypes.rst +++ b/Doc/library/ctypes.rst @@ -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 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |