summaryrefslogtreecommitdiff
path: root/pp_pack.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-06-07 22:22:34 +0000
committerNicholas Clark <nick@ccl4.org>2005-06-07 22:22:34 +0000
commit83003860610d4132632305aad5e79203998fbf38 (patch)
tree497a18eeb83578cc89dec486a7afc3551246593b /pp_pack.c
parent10516c54a74630cf74b5f3650f62a47cae3b2ac0 (diff)
downloadperl-83003860610d4132632305aad5e79203998fbf38.tar.gz
More SvPV consting
p4raw-id: //depot/perl@24744
Diffstat (limited to 'pp_pack.c')
-rw-r--r--pp_pack.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pp_pack.c b/pp_pack.c
index 5c600af073..b0d3b29dee 100644
--- a/pp_pack.c
+++ b/pp_pack.c
@@ -3513,7 +3513,7 @@ S_pack_rec(pTHX_ SV *cat, tempsym_t* symptr, SV **beglist, SV **endlist )
/* Fall through! */
case 'p':
while (len-- > 0) {
- char *aptr;
+ const char *aptr;
fromstr = NEXTFROM;
SvGETMAGIC(fromstr);
@@ -3532,7 +3532,7 @@ S_pack_rec(pTHX_ SV *cat, tempsym_t* symptr, SV **beglist, SV **endlist )
"Attempt to pack pointer to temporary value");
}
if (SvPOK(fromstr) || SvNIOK(fromstr))
- aptr = SvPV_flags(fromstr, n_a, 0);
+ aptr = SvPV_nomg_const(fromstr, n_a);
else
aptr = SvPV_force_flags(fromstr, n_a, 0);
}
@@ -3552,7 +3552,7 @@ S_pack_rec(pTHX_ SV *cat, tempsym_t* symptr, SV **beglist, SV **endlist )
"Field too wide in 'u' format in pack");
len = 63;
}
- aptr = SvPV(fromstr, fromlen);
+ aptr = SvPV_const(fromstr, fromlen);
from_utf8 = DO_UTF8(fromstr);
if (from_utf8) {
aend = aptr + fromlen;