9 Apr
2018
9 Apr
'18
10:28 a.m.
On 09/04/18 10:11, Dmitry Timoshkov wrote:
Sergio Gómez Del Real <sdelreal(a)codeweavers.com> wrote:
+ #include <pshpack2.h> + struct test_data_normal { + const WCHAR *str; + const WCHAR *nfc; + const WCHAR *nfd; + const WCHAR *nfkc; + const WCHAR *nfkd; + }; + #include <poppack.h> What's the reason to pack this structure to 2 bytes?
Hi. If I understand correctly, that pragma option leaves no gaps between the fields. Later on I iterate over the structure through a WCHAR *, starting from nfc, so I need the guarantee of the fields being contiguously laid out without padding.