ruby: fix codegen align int64_t on windows

develop
jj 2012-07-03 14:12:32 +02:00
parent b9425474a1
commit 0bdff401ca
1 changed files with 3 additions and 1 deletions

@ -516,7 +516,9 @@ sub get_field_align {
if ($meta eq 'number') { if ($meta eq 'number') {
$al = $field->getAttribute('ld:bits')/8; $al = $field->getAttribute('ld:bits')/8;
$al = 4 if $al > 4; # linux aligns int64_t to 4, windows to 8
# floats are 4 bytes so no pb
$al = 4 if ($al > 4 and ($os eq 'linux' or $al != 8));
} elsif ($meta eq 'global') { } elsif ($meta eq 'global') {
$al = get_global_align($field); $al = get_global_align($field);
} elsif ($meta eq 'compound') { } elsif ($meta eq 'compound') {