diff options
author | Nicholas Clark <nick@ccl4.org> | 2005-06-07 13:01:42 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2005-06-07 13:01:42 +0000 |
commit | 727b75065266fe9d20c37c822e74919eb0b182dc (patch) | |
tree | 37d9ef2320e245950edc67f35b220402ff237952 /pp.c | |
parent | 5c144d81801caa5e8317f6a38b40eb08257c47ea (diff) | |
download | perl-727b75065266fe9d20c37c822e74919eb0b182dc.tar.gz |
make pp_split const
p4raw-id: //depot/perl@24727
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -4527,18 +4527,18 @@ PP(pp_split) register IV limit = POPi; /* note, negative is forever */ SV *sv = POPs; STRLEN len; - register char *s = SvPV(sv, len); + register const char *s = SvPV_const(sv, len); bool do_utf8 = DO_UTF8(sv); - char *strend = s + len; + const char *strend = s + len; register PMOP *pm; register REGEXP *rx; register SV *dstr; - register char *m; + register const char *m; I32 iters = 0; const STRLEN slen = do_utf8 ? utf8_length((U8*)s, (U8*)strend) : (strend - s); I32 maxiters = slen + 10; I32 i; - char *orig; + const char *orig; I32 origlimit = limit; I32 realarray = 0; I32 base; @@ -4708,7 +4708,8 @@ PP(pp_split) while (s < strend && --limit) { PUTBACK; - i = CALLREGEXEC(aTHX_ rx, s, strend, orig, 1 , sv, NULL, 0); + i = CALLREGEXEC(aTHX_ rx, (char*)s, (char*)strend, (char*)orig, 1 , + sv, NULL, 0); SPAGAIN; if (i == 0) break; |