# HG changeset patch # User anatofuz # Date 1595224811 -32400 # Node ID 874577d7505fbd5821a179bcaea820be98c8a06e # Parent 8f2bc03fcbb2e4c206aeb1c045e96db6587a53de fix parse for interface diff -r 8f2bc03fcbb2 -r 874577d7505f src/gearsTools/lib/Gears/Util.pm --- a/src/gearsTools/lib/Gears/Util.pm Mon Jul 20 14:14:24 2020 +0900 +++ b/src/gearsTools/lib/Gears/Util.pm Mon Jul 20 15:00:11 2020 +0900 @@ -85,11 +85,12 @@ next if $static_data_gear_write_mode; my $args = $'; #$args eq (Impl* vm, pde_t* pgdir, char* init, uint sz, __code next(...)); - while ($args =~ /\s*(struct|union|const|enum)?\s*([\w*\[\]_]+)\s*(\w+),?/g) { + while ($args =~ /\s*(struct|union|const|enum)?\s*([\w*\[\]_]+)\s*(\w+)?,/g) { my $const_type = $1; my $type = $2; my $vname = $3; next if ($type eq '__code'); + next unless $vname; # __code hoge(int ret, __code next(ret, ...); this is second "ret" case $type =~ s/^(?:Impl|Type|Isa)\s*(\*)?/union Data$1/; my $val = "$type $vname;\n"; push(@tmp_args, $const_type ? "$const_type $val" : $val);