summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2010-08-30 19:05:27 +0200
committerYves Orton <demerphq@gmail.com>2010-08-30 19:09:28 +0200
commitcfe9162d0d593cd12a979c73df82c7509b324343 (patch)
treeaf769eb465dfe665193a4744d7de6e901a66b96c /pp.c
parentc89e1b5ce75f6c47bfc6ebb8dc0602bd7ef88427 (diff)
downloadperl-cfe9162d0d593cd12a979c73df82c7509b324343.tar.gz
use more efficient sv_reftype_len() interface
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/pp.c b/pp.c
index fcb7ff2d97..31614ed0e6 100644
--- 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;
}