[PATCH v2] kernel32/tests: Add tests for NormalizeString API function.
Sergio Gómez Del Real
sdelreal at codeweavers.com
Mon Apr 9 11:25:28 CDT 2018
On 09/04/18 11:16, Dmitry Timoshkov wrote:
> Sergio Gómez Del Real <sdelreal at 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.
> What kind of padding do you observe in ths case? Even in a pure
> theoretical case it's impossible to have a 2 bytes gap between
> pointers of either 4 (32-bit arch) or 8 bytes (64-bit arch) long.
>
You are right... I didn't give it enough thought; I just assumed there
could be padding.
Thank you and sorry for the confusion.
- Sergio
More information about the wine-devel
mailing list