diff options
author | Andy Lester <andy@petdance.com> | 2005-03-25 08:43:31 -0600 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-03-25 21:02:04 +0000 |
commit | 73d840c0daa603a18a29260159881d4ef6772d73 (patch) | |
tree | b5e129b2bb73cff2818caf0fa6c7f60ce32a2635 /utf8.c | |
parent | cacf81f42beab47944769821db143b4be96edd5d (diff) | |
download | perl-73d840c0daa603a18a29260159881d4ef6772d73.tar.gz |
Consting part 4
Message-ID: <20050325204331.GA16388@petdance.com>
p4raw-id: //depot/perl@24079
Diffstat (limited to 'utf8.c')
-rw-r--r-- | utf8.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -787,7 +787,7 @@ Perl_bytes_from_utf8(pTHX_ const U8 *s, STRLEN *len, bool *is_utf8) I32 count = 0; if (!*is_utf8) - return start; + return (U8 *)start; /* ensure valid UTF-8 and chars < 256 before converting string */ for (send = s + *len; s < send;) { @@ -797,7 +797,7 @@ Perl_bytes_from_utf8(pTHX_ const U8 *s, STRLEN *len, bool *is_utf8) (c = *s++) && UTF8_IS_CONTINUATION(c)) count++; else - return start; + return (U8 *)start; } } @@ -816,7 +816,7 @@ Perl_bytes_from_utf8(pTHX_ const U8 *s, STRLEN *len, bool *is_utf8) } *d = '\0'; *len = d - start; - return start; + return (U8 *)start; } /* @@ -1620,7 +1620,7 @@ Perl_swash_init(pTHX_ const char* pkg, const char* name, SV *listsv, I32 minbits POPSTACK; if (IN_PERL_COMPILETIME) { STRLEN len; - char* pv = SvPV(tokenbufsv, len); + const char* pv = SvPV(tokenbufsv, len); Copy(pv, PL_tokenbuf, len+1, char); PL_curcop->op_private = (U8)(PL_hints & HINT_PRIVATE_MASK); |