summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-06-07 19:45:13 +0000
committerNicholas Clark <nick@ccl4.org>2005-06-07 19:45:13 +0000
commit245d4a47e185d4e38ca6440eb62ae19d5e411fd1 (patch)
treee239aa1ac71d0acac712e2a7d3a0d8bf91b1d696 /pp_ctl.c
parent5f1478c393a03bf1defcb0d2dec70e6a17a8c864 (diff)
downloadperl-245d4a47e185d4e38ca6440eb62ae19d5e411fd1.tar.gz
More consting of SvPV
p4raw-id: //depot/perl@24742
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index befebb6ee9..406ad23b57 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -388,7 +388,7 @@ PP(pp_formline)
register SV *tmpForm = *++MARK;
register U32 *fpc;
register char *t;
- register char *f;
+ const char *f;
register char *s;
register char *send;
register I32 arg;
@@ -428,11 +428,9 @@ PP(pp_formline)
targ_is_utf8 = TRUE;
t = SvGROW(PL_formtarget, len + fudge + 1); /* XXX SvCUR bad */
t += len;
- f = SvPV(tmpForm, len);
+ f = SvPV_const(tmpForm, len);
/* need to jump to the next word */
- s = f + len + WORD_ALIGN - SvCUR(tmpForm) % WORD_ALIGN;
-
- fpc = (U32*)s;
+ fpc = (U32*)(f + len + WORD_ALIGN - SvCUR(tmpForm) % WORD_ALIGN);
for (;;) {
DEBUG_f( {
@@ -511,7 +509,7 @@ PP(pp_formline)
break;
case FF_CHECKNL:
- item = s = SvPV(sv, len);
+ s = item = SvPV(sv, len);
itemsize = len;
if (DO_UTF8(sv)) {
itemsize = sv_len_utf8(sv);
@@ -553,7 +551,7 @@ PP(pp_formline)
break;
case FF_CHECKCHOP:
- item = s = SvPV(sv, len);
+ s = item = SvPV(sv, len);
itemsize = len;
if (DO_UTF8(sv)) {
itemsize = sv_len_utf8(sv);
@@ -732,7 +730,7 @@ PP(pp_formline)
case FF_LINEGLOB:
oneline = FALSE;
ff_line:
- item = s = SvPV(sv, len);
+ s = item = SvPV(sv, len);
itemsize = len;
if ((item_is_utf8 = DO_UTF8(sv)))
itemsize = sv_len_utf8(sv);