File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -714,10 +714,16 @@ item in the :attr:`~Structure._fields_` tuples::
714714 ... ("second_16", c_int, 16)]
715715 ...
716716 >>> print(Int.first_16)
717- <Field type=c_long , ofs=0:0, bits =16>
717+ <ctypes.CField 'first_16' type=c_int , ofs=0, bit_size =16, bit_offset=0 >
718718 >>> print(Int.second_16)
719- <Field type=c_long, ofs=0:16, bits=16>
720- >>>
719+ <ctypes.CField 'second_16' type=c_int, ofs=0, bit_size=16, bit_offset=16>
720+
721+ It is important to note that bit field allocation and layout in memory are not
722+ defined as a C standard; their implementation is compiler-specific.
723+ By default, Python will attempt to match the behavior of a "native" compiler
724+ for the current platform.
725+ See the :attr: `~Structure._layout_ ` attribute for details on the default
726+ behavior and how to change it.
721727
722728
723729.. _ctypes-arrays :
You can’t perform that action at this time.
0 commit comments