X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=src%2Fupdate.pl;h=a1eac2545d72857be3dc704da092850ab417fef5;hb=334f1b94af28b0ccc9440d2321bc7ca8423da073;hp=a36c99d376cc9316a421a14086dc61c46dd2472b;hpb=3873fbc39d250734131e096da47add0cf601d194;p=perl%2Fmodules%2Fre-engine-Hooks.git diff --git a/src/update.pl b/src/update.pl index a36c99d..a1eac25 100644 --- a/src/update.pl +++ b/src/update.pl @@ -43,13 +43,13 @@ local $SIG{'INT'} = sub { exit 1 }; sub new { my $class = shift; - + my %args = @_; my ($path, $indent, $keep) = @args{qw}; die "Path $path already exists" if -e $path; File::Path::mkpath($path); - + bless { path => $path, indent => $indent || 0, @@ -218,8 +218,16 @@ sub fetch_source_file { my %patched_chunks; my %expected_chunks = ( - 'regcomp.c' => [ qw, ('COMP_NODE_HOOK') x 3 ], - 'regexec.c' => [ qw ], + 'regcomp.c' => [ + 're_defs', + 'COMP_NODE_HOOK', + 'COMP_BEGIN_HOOK', + ('COMP_NODE_HOOK') x 3, + ], + 'regexec.c' => [ + 're_defs', + 'EXEC_NODE_HOOK', + ], ); sub patch_regcomp { @@ -235,6 +243,9 @@ sub patch_regcomp { my $shift = $1 ? 2 : 1; push @{$patched_chunks{$file}}, 'COMP_NODE_HOOK'; return $line, " REH_CALL_COMP_NODE_HOOK(pRExC_state->rx, ($2) - $shift);\n" + } elsif ($line =~ /end node insert/) { + push @{$patched_chunks{$file}}, 'COMP_NODE_HOOK'; + return $line, " REH_CALL_COMP_NODE_HOOK(pRExC_state->rx, convert);\n"; } return $line; @@ -336,4 +347,4 @@ for my $tag (sort { $a <=> $b } keys %perls) { print $out sort @manifest_files, @source_files; print "done\n"; -} +}