diff options
| author | Eli Bendersky <eliben@gmail.com> | 2013-03-09 13:55:24 (GMT) |
|---|---|---|
| committer | Eli Bendersky <eliben@gmail.com> | 2013-03-09 13:55:24 (GMT) |
| commit | 439b2bf4cded7d2bca3da4aeab9a5b30feb8099c (patch) | |
| tree | f642a7bdbb2181281160dd4fb99101fa7e62ee26 | |
| parent | 1329cbc02945a5de51b4289959acb7a3004b1bad (diff) | |
| parent | c2d90fb3ec648cb84db9ed037c734e574e3655ae (diff) | |
| download | cpython-439b2bf4cded7d2bca3da4aeab9a5b30feb8099c.zip cpython-439b2bf4cded7d2bca3da4aeab9a5b30feb8099c.tar.gz cpython-439b2bf4cded7d2bca3da4aeab9a5b30feb8099c.tar.bz2 | |
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 9212d34..5f5a512 100644 --- a/Doc/library/ctypes.rst +++ b/Doc/library/ctypes.rst @@ -608,6 +608,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 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
