X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=embed.pl;h=60d0046e10e05467aadca0dcdffd01ad12b6f513;hb=26f423df377276528161ee2c2bb3d257fc527c90;hp=4a9176fc6ffb8a8842023400d2a725c021fa440b;hpb=8fb26106616b06907474b33cfb67b5e1e186bd1a;p=p5sagit%2Fp5-mst-13.2.git diff --git a/embed.pl b/embed.pl index 4a9176f..60d0046 100755 --- a/embed.pl +++ b/embed.pl @@ -1,9 +1,5 @@ #!/usr/bin/perl -w -BEGIN { - unshift @INC, "./lib"; -} - require 5.003; # keep this compatible, an old perl is all we may have before # we build the new one @@ -49,7 +45,8 @@ sub walk_table (&@) { else { @args = split /\s*\|\s*/, $_; } - print $F $function->(@args); + my @outs = &{$function}(@args); + print $F @outs; # $function->(@args) is not 5.003 } print $F $trailer if $trailer; close $F unless ref $filename; @@ -251,7 +248,8 @@ readvars %intrp, 'intrpvar.h','I'; readvars %thread, 'thrdvar.h','T'; readvars %globvar, 'perlvars.h','G'; -foreach my $sym (sort keys %thread) { +my $sym; +foreach $sym (sort keys %thread) { warn "$sym in intrpvar.h as well as thrdvar.h\n" if exists $intrp{$sym}; } @@ -856,15 +854,15 @@ START_EXTERN_C EOT -foreach my $sym (sort keys %intrp) { +foreach $sym (sort keys %intrp) { print CAPIH bincompat_var('I',$sym); } -foreach my $sym (sort keys %thread) { +foreach $sym (sort keys %thread) { print CAPIH bincompat_var('T',$sym); } -foreach my $sym (sort keys %globvar) { +foreach $sym (sort keys %globvar) { print CAPIH bincompat_var('G',$sym); } @@ -985,7 +983,7 @@ sub emit_func { if (length $return) { $decl .= " $rettype retval;\n"; $retarg .= "retval = "; - $return = "\n ${return}retval;\n"; + $return = "\n " . $return . "retval;\n"; } $emitval .= <