This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
parts/ppptools.pl: Don't omit any fcns/macros in parsing .fnc
authorKarl Williamson <khw@cpan.org>
Tue, 9 Jul 2019 17:47:47 +0000 (11:47 -0600)
committerNicolas R <atoomic@cpan.org>
Fri, 27 Sep 2019 22:39:28 +0000 (16:39 -0600)
A commit I made some years ago caused deprecated and experimental
functions from not being parsed.  This was the wrong thing to do.
This is because some tools like scan_prov (which hasn't been run in many
years) need them.  Instead this moves the skipping to the routine that
needs to skip, and doesn't skip as many categories.

(cherry picked from commit 24f05e758aa2d50ac85aa495b956b209e52a5e84)
Signed-off-by: Nicolas R <atoomic@cpan.org>
dist/Devel-PPPort/parts/apicheck.pl
dist/Devel-PPPort/parts/ppptools.pl

index 65ece66..9c2a0f3 100644 (file)
@@ -200,8 +200,6 @@ for $f (@f) {
   $ignore{$f->{name}} and next;
   $f->{flags}{A} or next;  # only public API members
 
   $ignore{$f->{name}} and next;
   $f->{flags}{A} or next;  # only public API members
 
-  $ignore{$f->{name}} = 1; # ignore duplicates
-
   my $Perl_ = $f->{flags}{p} ? 'Perl_' : '';
 
   my $stack = '';
   my $Perl_ = $f->{flags}{p} ? 'Perl_' : '';
 
   my $stack = '';
index 146438a..baa4c4e 100644 (file)
@@ -306,12 +306,13 @@ sub parse_embed
         my @e = split /\s*\|\s*/, $line;
         if( @e >= 3 ) {
           my($flags, $ret, $name, @args) = @e;
         my @e = split /\s*\|\s*/, $line;
         if( @e >= 3 ) {
           my($flags, $ret, $name, @args) = @e;
-          next unless $flags =~ /A/; # Skip non-public entries
 
 
-          # Skip entries marked as deprecated or unstable, or non-name ones, like
+          # Skip non-name entries, like
           #    PL_parser-E<gt>linestr
           #    PL_parser-E<gt>linestr
-          # which documents a struct entry rather than a function
-          next if $flags =~ /[DxN]/;
+          # which documents a struct entry rather than a function.  We retain
+          # all other entries, so that our caller has full information, and
+          # may skip things like non-public functions.
+          next if $flags =~ /N/;
           if ($name =~ /^[^\W\d]\w*$/) {
             for (@args) {
               $_ = [trim_arg($_)];
           if ($name =~ /^[^\W\d]\w*$/) {
             for (@args) {
               $_ = [trim_arg($_)];