cpython: 502624235c7b (original) (raw)
Mercurial > cpython
changeset 82569:502624235c7b
Add warning in ctypes documentation for #16575 and #16576 [#16575]
Eli Bendersky eliben@gmail.com | |
---|---|
date | Sat, 09 Mar 2013 05:55:24 -0800 |
parents | d0fcb4c9f231(current diff)bfc159f8e4b4(diff) |
children | f27d7c1eac4d |
files | |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-)[+] [-] Doc/library/ctypes.rst 7 |
line wrap: on
line diff
--- a/Doc/library/ctypes.rst +++ b/Doc/library/ctypes.rst @@ -608,6 +608,13 @@ for debugging because they can provide u .. _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 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^