mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-06 17:04:06 +00:00
widl: Use padding instead of alignment in structure format strings.
For compatibility with midl.
This commit is contained in:
parent
855eb3afcd
commit
af058da893
|
@ -3161,25 +3161,12 @@ static void write_struct_members(FILE *file, const type_t *type,
|
|||
|
||||
if (!is_conformant_array(ft) || type_array_is_decl_as_ptr(ft))
|
||||
{
|
||||
if ((align - 1) & offset)
|
||||
unsigned short aligned = ROUND_SIZE(offset, align);
|
||||
if (aligned > offset)
|
||||
{
|
||||
unsigned char fc = 0;
|
||||
switch (align)
|
||||
{
|
||||
case 2:
|
||||
fc = FC_ALIGNM2;
|
||||
break;
|
||||
case 4:
|
||||
fc = FC_ALIGNM4;
|
||||
break;
|
||||
case 8:
|
||||
fc = FC_ALIGNM8;
|
||||
break;
|
||||
default:
|
||||
error("write_struct_members: cannot align type %d\n", type_get_type(ft));
|
||||
}
|
||||
unsigned char fc = FC_STRUCTPAD1 + (aligned - offset) - 1;
|
||||
print_file(file, 2, "0x%x,\t/* %s */\n", fc, string_of_type(fc));
|
||||
offset = ROUND_SIZE(offset, align);
|
||||
offset = aligned;
|
||||
*typestring_offset += 1;
|
||||
}
|
||||
write_member_type(file, type, is_complex, field->attrs, field->declspec.type, corroff,
|
||||
|
|
Loading…
Reference in a new issue