ruby: use implicit init-value -1 for ref-target/refers-to in codegen

develop
jj 2012-09-14 21:45:01 +02:00
parent eacca723e0
commit 72141a3c9b
1 changed files with 1 additions and 0 deletions

@ -788,6 +788,7 @@ sub render_item_number {
my $subtype = $item->getAttribute('ld:subtype');
my $meta = $item->getAttribute('ld:meta');
my $initvalue = $item->getAttribute('init-value');
$initvalue ||= -1 if $item->getAttribute('refers-to') or $item->getAttribute('ref-target');
my $typename = $item->getAttribute('type-name');
undef $typename if ($meta and $meta eq 'bitfield-type');
my $g = $global_types{$typename} if ($typename);