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:
c89e1b5
)
use more efficient sv_reftype_len() interface
author
Yves Orton
<demerphq@gmail.com>
Mon, 30 Aug 2010 17:05:27 +0000
(19:05 +0200)
committer
Yves Orton
<demerphq@gmail.com>
Mon, 30 Aug 2010 17:09:28 +0000
(19:09 +0200)
pp.c
patch
|
blob
|
blame
|
history
diff --git
a/pp.c
b/pp.c
index
fcb7ff2
..
31614ed
100644
(file)
--- a/
pp.c
+++ b/
pp.c
@@
-559,6
+559,7
@@
PP(pp_ref)
dVAR; dSP; dTARGET;
const char *pv;
SV * const sv = POPs;
+ STRLEN len;
if (sv)
SvGETMAGIC(sv);
@@
-566,8
+567,8
@@
PP(pp_ref)
if (!sv || !SvROK(sv))
RETPUSHNO;
- pv = sv_reftype
(SvRV(sv),TRUE
);
- PUSHp(pv,
strlen(pv)
);
+ pv = sv_reftype
_len(SvRV(sv),TRUE,&len
);
+ PUSHp(pv,
len
);
RETURN;
}