changeset 644:670b972b6ff0

bump Gears::Util
author anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Tue, 21 Jul 2020 09:41:59 +0900
parents 5aa0ed440919
children e6e35cba24ae
files src/parallel_execution/lib/Gears/Util.pm
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/parallel_execution/lib/Gears/Util.pm	Fri Jul 17 14:20:59 2020 +0900
+++ b/src/parallel_execution/lib/Gears/Util.pm	Tue Jul 21 09:41:59 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);
@@ -202,7 +203,7 @@
           next;
        }
 
-       if ($line =~ /^\/\/\s*data_gear\s*"(.*)\.(?:h|dg)?"/) {
+       if ($line =~ /^\/\/\s*include\s*"(.*)\.(?:h|dg)?"/) {
           push(@{$include_pool{$1}->{$cbc_file}},$.);
           next;
        }