Commit af058da8 authored by Alexandre Julliard's avatar Alexandre Julliard

widl: Use padding instead of alignment in structure format strings.

For compatibility with midl.
parent 855eb3af
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment