Add warning in ctypes documentation for #16575 and #16576

This commit is contained in:
Eli Bendersky 2013-03-09 05:54:32 -08:00
commit c2d90fb3ec
1 changed files with 7 additions and 0 deletions

View File

@ -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
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^