This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d0cf06b
)
parts/apicheck.pl: Handle const parameters
author
Karl Williamson
<khw@cpan.org>
Tue, 25 Jun 2019 17:46:33 +0000
(11:46 -0600)
committer
Nicolas R
<atoomic@cpan.org>
Fri, 27 Sep 2019 22:39:29 +0000
(16:39 -0600)
We now have parameters that are declared 'const'. The code generated
previously was declared const without being initialized, which is now
fatal.
(cherry picked from commit
35286f38df4517fb5fa338fcff410eaa5c0ddce0
)
Signed-off-by: Nicolas R <atoomic@cpan.org>
dist/Devel-PPPort/parts/apicheck.pl
patch
|
blob
|
blame
|
history
diff --git
a/dist/Devel-PPPort/parts/apicheck.pl
b/dist/Devel-PPPort/parts/apicheck.pl
index
e043690
..
5f7cfd5
100644
(file)
--- a/
dist/Devel-PPPort/parts/apicheck.pl
+++ b/
dist/Devel-PPPort/parts/apicheck.pl
@@
-235,7
+235,9
@@
for $f (@f) {
else {
my $v = 'arg' . $i++;
push @arg, $v;
- $stack .= " static $n $p$v$d;\n";
+ my $no_const_n = $n;
+ $no_const_n =~ s/\bconst\b// unless $p;
+ $stack .= " static $no_const_n $p$v$d;\n";
}
}