summaryrefslogtreecommitdiff
path: root/pp_pack.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-06-07 21:16:13 +0000
committerNicholas Clark <nick@ccl4.org>2005-06-07 21:16:13 +0000
commit10516c54a74630cf74b5f3650f62a47cae3b2ac0 (patch)
treebf97f300ff97cf11727fc86c6de43751b823c6da /pp_pack.c
parent245d4a47e185d4e38ca6440eb62ae19d5e411fd1 (diff)
downloadperl-10516c54a74630cf74b5f3650f62a47cae3b2ac0.tar.gz
More SvPV consting
p4raw-id: //depot/perl@24743
Diffstat (limited to 'pp_pack.c')
-rw-r--r--pp_pack.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/pp_pack.c b/pp_pack.c
index b3c2f07018..5c600af073 100644
--- a/pp_pack.c
+++ b/pp_pack.c
@@ -2005,8 +2005,7 @@ S_unpack_rec(pTHX_ tempsym_t* symptr, const char *s, const char *strbeg, const c
continue;
}
if (++bytes >= sizeof(UV)) { /* promote to string */
- char *t;
- STRLEN n_a;
+ const char *t;
sv = Perl_newSVpvf(aTHX_ "%.*"UVf, (int)TYPE_DIGITS(UV), auv);
while (s < strend) {
@@ -2017,7 +2016,7 @@ S_unpack_rec(pTHX_ tempsym_t* symptr, const char *s, const char *strbeg, const c
break;
}
}
- t = SvPV(sv, n_a);
+ t = SvPV_nolen_const(sv);
while (*t == '0')
t++;
sv_chop(sv, t);
@@ -2904,14 +2903,14 @@ S_pack_rec(pTHX_ SV *cat, tempsym_t* symptr, SV **beglist, SV **endlist )
}
case 'H':
case 'h': {
- char *str, *end;
+ const char *str, *end;
I32 l, field_len;
U8 bits;
bool utf8_source;
U32 utf8_flags;
fromstr = NEXTFROM;
- str = SvPV(fromstr, fromlen);
+ str = SvPV_const(fromstr, fromlen);
end = str + fromlen;
if (DO_UTF8(fromstr)) {
utf8_source = TRUE;