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:
cfc7ef1
)
[perl #122728] Make sub(){undef} inlinable
author
Father Chrysostomos
<sprout@cpan.org>
Tue, 9 Sep 2014 05:54:10 +0000
(22:54 -0700)
committer
Father Chrysostomos
<sprout@cpan.org>
Tue, 9 Sep 2014 05:54:29 +0000
(22:54 -0700)
op.c
patch
|
blob
|
blame
|
history
diff --git
a/op.c
b/op.c
index
0c6f11e
..
abe93a7
100644
(file)
--- a/
op.c
+++ b/
op.c
@@
-7199,6
+7199,10
@@
Perl_op_const_sv(pTHX_ const OP *o, CV *cv)
return NULL;
if (type == OP_CONST && cSVOPo->op_sv)
sv = cSVOPo->op_sv;
+ else if (type == OP_UNDEF && !o->op_private) {
+ sv = newSV(0);
+ SAVEFREESV(sv);
+ }
else if (cv && type == OP_CONST) {
sv = PAD_BASE_SV(CvPADLIST(cv), o->op_targ);
if (!sv)