In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/d0ee0d3dfddcff45b2c94b64521f78ee989902e8?hp=7a5a24f787ecccfb7736f8164fb1c322e77e1219>

- Log -----------------------------------------------------------------
commit d0ee0d3dfddcff45b2c94b64521f78ee989902e8
Author: Nicholas Clark <[email protected]>
Date:   Wed Sep 22 15:25:17 2010 +0100

    Remove &munge_c_files from embed.pl, as it has never been used.
    
    It was added, with the only call to it commented out, in cea2e8a9dd23747f.
    This means that walk_table's support for undef meaning 'no output' can
    removed.
-----------------------------------------------------------------------

Summary of changes:
 embed.pl |   37 +++----------------------------------
 1 files changed, 3 insertions(+), 34 deletions(-)

diff --git a/embed.pl b/embed.pl
index 0f3b807..5cb7764 100755
--- a/embed.pl
+++ b/embed.pl
@@ -129,53 +129,22 @@ sub walk_table (&@) {
     if (ref $filename) {       # filehandle
        $F = $filename;
     }
-    elsif (defined $filename) {
+    else {
        $F = safer_open("$filename-new");
        print $F do_not_edit ($filename);
     }
     foreach (@embed) {
        my @outs = &{$function}(@$_);
        # $function->(@args) is not 5.003
-       print $F @outs if $F;
+       print $F @outs;
     }
     print $F $trailer if $trailer;
-    if (defined $filename && !ref $filename) {
+    unless (ref $filename) {
        safer_close($F);
        rename_if_different("$filename-new", $filename);
     }
 }
 
-sub munge_c_files () {
-    my $functions = {};
-    unless (@ARGV) {
-       warn "\...@argv empty, nothing to do\n";
-       return;
-    }
-    walk_table {
-       if (@_ > 1) {
-           $functions->{$_[2]} = \...@_ if $...@_-1] =~ /\.\.\./;
-       }
-    };
-    local $^I = '.bak';
-    while (<>) {
-       s{(\b(\w+)[ \t]*\([ \t]*(?!aTHX))}
-        {
-           my $repl = $1;
-           my $f = $2;
-           if (exists $functions->{$f}) {
-               $repl .= "aTHX_ ";
-               warn("$ARGV:$.:$`#$repl#$'");
-           }
-           $repl;
-        }eg;
-       print;
-       close ARGV if eof;      # restart $.
-    }
-    exit;
-}
-
-#munge_c_files();
-
 # generate proto.h
 my $wrote_protected = 0;
 

--
Perl5 Master Repository

Reply via email to