Commit e2bf3343 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

- Assume 8 byte maximum alignment.

- Sync type testing data with the headers.
parent 97594743
......@@ -246,7 +246,7 @@ sub _refresh {
my $field_sizes = \${$self->{FIELD_SIZES}};
my $pack = $self->pack;
$pack = 4 if !defined($pack);
$pack = 8 if !defined($pack);
my $max_field_align = 0;
......
......@@ -191,7 +191,7 @@ sub _find_align_kind_size {
$align = 4;
$kind = "pointer";
$size = 4;
} elsif(/^(?:(signed|unsigned)\s+)?(?:__int8|char)$/) {
} elsif(/^(?:(signed|unsigned)\s+)?(?:__int8|char|byte)$/) {
$align = 1;
$kind = defined($1) ? $1 : "signed";
$size = 1;
......@@ -216,18 +216,18 @@ sub _find_align_kind_size {
$kind = defined($1) ? $1 : "signed";
$size = 8;
} elsif (/^(?:double)$/) {
$align = 4;
$align = 8;
$kind = "float";
$size = 8;
} elsif (/^(?:long\s+double)$/) {
$align = 4;
$kind = "float";
$size = 12;
} elsif (/^H(?:DC|BITMAP|BRUSH|ICON|INSTANCE|MENU|METAFILE|WND)$/) {
} elsif (/^H(?:DC|BITMAP|BRUSH|ICON|INSTANCE|KEY|MENU|METAFILE|RESULT|WND)$/) {
$align = 4;
$kind = "unsigned";
$size = 4;
} elsif (/^LP(?:CSTR|CWSTR|DWORD|VOID|WSTR)$/) {
} elsif (/^LP(?:BYTE|CSTR|CWSTR|DWORD|STR|VOID|WSTR)$/) {
$align = 4;
$kind = "pointer";
$size = 4;
......@@ -235,9 +235,29 @@ sub _find_align_kind_size {
$align = 4;
$kind = "struct";
$size = 8;
} elsif (/^(?:LARGE_INTEGER)$/) {
} elsif (/^(?:VOID)$/) {
$align = 4;
$kind = "signed";
$size = 4;
} elsif (/^(?:SHORT)$/) {
$align = 2;
$kind = "unsigned";
$size = 2;
} elsif (/^(?:BYTE)$/) {
$align = 1;
$kind = "unsigned";
$size = 1;
} elsif (/^(?:DWORD)$/) {
$align = 4;
$kind = "signed";
$kind = "unsigned";
$size = 4;
} elsif (/^(?:WORD)$/) {
$align = 2;
$kind = "unsigned";
$size = 2;
} elsif (/^(?:LARGE_INTEGER)$/) {
$align = 8;
$kind = "union";
$size = 8;
} elsif (/^(struct|union)$/) {
$kind = $1;
......
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