From: Nicholas Clark Date: Tue, 7 Jun 2005 13:01:42 +0000 (+0000) Subject: make pp_split const X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=727b75065266fe9d20c37c822e74919eb0b182dc;p=p5sagit%2Fp5-mst-13.2.git make pp_split const p4raw-id: //depot/perl@24727 --- diff --git a/pp.c b/pp.c index e69d3e2..896b573 100644 --- a/pp.c +++ b/pp.c @@ -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;