diff options
author | Ilya Zakharevich <ilya@math.berkeley.edu> | 1998-10-30 19:30:57 -0500 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-10-31 09:35:03 +0000 |
commit | f4d63e4e7d78bcec478ee81b6381e3ffc03f7329 (patch) | |
tree | bd2962d81d3059acdc0f3f25b288756ed9e70113 | |
parent | 7820172aeabcfabb96bd74a4753f9acdd5f3e3da (diff) | |
download | perl-f4d63e4e7d78bcec478ee81b6381e3ffc03f7329.tar.gz |
fix for bugs in -x mode
Message-Id: <199810310530.AAA22277@monk.mps.ohio-state.edu>
Subject: [PATCH 5.00552] Fix h2xs
p4raw-id: //depot/perl@2160
-rw-r--r-- | utils/h2xs.PL | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/utils/h2xs.PL b/utils/h2xs.PL index 44cb0fb242..47f7adaae3 100644 --- a/utils/h2xs.PL +++ b/utils/h2xs.PL @@ -362,8 +362,8 @@ chdir($modpname) || die "Can't chdir $ext$modpname: $!\n"; my %types_seen; my %std_types; -my $fdecls; -my $fdecls_parsed; +my $fdecls = []; +my $fdecls_parsed = []; if( ! $opt_X ){ # use XS, unless it was disabled open(XS, ">$modfname.xs") || die "Can't create $ext$modpname/$modfname.xs: $!\n"; @@ -374,22 +374,20 @@ if( ! $opt_X ){ # use XS, unless it was disabled get_typemap(); my $c; my $filter; - my @fdecls; - foreach my $filename (@path_h) { - my $addflags = $opt_F || ''; - if ($fullpath =~ /,/) { - $filename = $`; - $filter = $'; + foreach my $filename (@path_h) { + my $addflags = $opt_F || ''; + if ($fullpath =~ /,/) { + $filename = $`; + $filter = $'; + } + warn "Scanning $filename for functions...\n"; + $c = new C::Scan 'filename' => $filename, 'filename_filter' => $filter, + 'add_cppflags' => $addflags; + $c->set('includeDirs' => ["$Config::Config{archlib}/CORE"]); + + push @$fdecls_parsed, @{ $c->get('parsed_fdecls') }; + push(@$fdecls, @{$c->get('fdecls')}); } - warn "Scanning $filename for functions...\n"; - $c = new C::Scan 'filename' => $filename, 'filename_filter' => $filter, - 'add_cppflags' => $addflags; - $c->set('includeDirs' => ["$Config::Config{archlib}/CORE"]); - - $fdecls_parsed = $c->get('parsed_fdecls'); - push(@fdecls, @{$c->get('fdecls')}); - } - $fdecls = [ @fdecls ]; } } |