ruby: add stl-fstream to codegen

develop
jj 2014-09-24 23:37:25 +02:00
parent b0b6a82c92
commit 1a38c72763
1 changed files with 12 additions and 0 deletions

@ -595,6 +595,9 @@ sub get_field_align {
$al = get_field_align($tg);
} elsif ($meta eq 'bytes') {
$al = $field->getAttribute('alignment') || 1;
} elsif ($meta eq 'primitive') {
my $subtype = $field->getAttribute('ld:subtype');
if ($subtype eq 'stl-fstream' and $os eq 'windows') { $al = 8; }
}
return $al;
@ -735,6 +738,14 @@ sub sizeof {
print "sizeof stl-string on $os\n";
}
print "sizeof stl-string\n";
} elsif ($subtype eq 'stl-fstream') { if ($os eq 'linux') {
return 284;
} elsif ($os eq 'windows') {
return 184;
} else {
print "sizeof stl-fstream on $os\n";
}
print "sizeof stl-fstream\n";
} else {
print "sizeof primitive $subtype\n";
}
@ -1011,6 +1022,7 @@ sub render_item_primitive {
my $subtype = $item->getAttribute('ld:subtype');
if ($subtype eq 'stl-string') {
push @lines_rb, "stl_string";
} elsif ($subtype eq 'stl-fstream') {
} else {
print "no render primitive $subtype\n";
}