Perl 5
/
perl.git
/ commitdiff
free
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
committers
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
feef49c
)
pp.c: pp_ref: remove null checks
author
Father Chrysostomos
<sprout@cpan.org>
Fri, 14 Jun 2013 08:31:01 +0000
(
01:31
-0700)
committer
Father Chrysostomos
<sprout@cpan.org>
Sat, 15 Jun 2013 01:13:17 +0000
(18:13 -0700)
There is no way a null can get on to the stack here. The only piece
of code that puts nulls on the stack is pp_coreargs, which doesn’t do
that for functions with a _ prototype.
pp.c
patch
|
blob
|
blame
|
history
diff --git
a/pp.c
b/pp.c
index
def561a
..
670c3f1
100644
(file)
--- a/
pp.c
+++ b/
pp.c
@@
-590,10
+590,8
@@
PP(pp_ref)
dVAR; dSP; dTARGET;
SV * const sv = POPs;
- if (sv)
- SvGETMAGIC(sv);
-
- if (!sv || !SvROK(sv))
+ SvGETMAGIC(sv);
+ if (!SvROK(sv))
RETPUSHNO;
(void)sv_ref(TARG,SvRV(sv),TRUE);