* we want to make sure everything inside is valid utf8 first.
*/
c = (const U8 *) SvPVX_const(sv);
- if (!is_utf8_string(c, SvCUR(sv)+1))
+ if (!is_utf8_string((U8 *)c, SvCUR(sv)+1))
return FALSE;
e = (const U8 *) SvEND(sv);
while (c < e) {
if (!intro)
cv_ckproto(cv, (GV*)dstr,
SvPOK(sref)
- ? SvPVX_const(sref) : Nullch);
+ ? (char *)SvPVX_const(sref)
+ : Nullch);
}
GvCV(dstr) = (CV*)sref;
GvCVGEN(dstr) = 0; /* Switch off cacheness. */
}
/* Rest of work is done else where */
- mg = sv_magicext(sv,obj,how,vtable,name,namlen);
+ mg = sv_magicext(sv,obj,how,(MGVTBL *)vtable,name,namlen);
switch (how) {
case PERL_MAGIC_taint:
#endif
}
else {
- ulen = Perl_utf8_length(aTHX_ s, s + len);
+ ulen = Perl_utf8_length(aTHX_ (U8 *)s, (U8 *)s + len);
if (!mg && !SvREADONLY(sv)) {
sv_magic(sv, 0, PERL_MAGIC_utf8, 0, 0);
mg = mg_find(sv, PERL_MAGIC_utf8);
/* Call utf8n_to_uvchr() to validate the sequence
* (unless a simple non-UTF character) */
if (!UTF8_IS_INVARIANT(*s))
- utf8n_to_uvchr(s, UTF8SKIP(s), &n, 0);
+ utf8n_to_uvchr((U8 *)s, UTF8SKIP(s), &n, 0);
if (n > 0) {
s += n;
len++;
if (SvUTF8(sv1)) {
/* sv1 is the UTF-8 one,
* if is equal it must be downgrade-able */
- char * const pv = (char*)bytes_from_utf8((const U8*)pv1,
+ char * const pv = (char*)bytes_from_utf8((U8*)pv1,
&cur1, &is_utf8);
if (pv != pv1)
pv1 = tpv = pv;
else {
/* sv2 is the UTF-8 one,
* if is equal it must be downgrade-able */
- char * const pv = (char *)bytes_from_utf8((const U8*)pv2,
+ char * const pv = (char *)bytes_from_utf8((U8*)pv2,
&cur2, &is_utf8);
if (pv != pv2)
pv2 = tpv = pv;
pv2 = SvPV_const(svrecode, cur2);
}
else {
- pv2 = tpv = (char*)bytes_to_utf8((const U8*)pv2, &cur2);
+ pv2 = tpv = (char*)bytes_to_utf8((U8*)pv2, &cur2);
}
}
else {
pv1 = SvPV_const(svrecode, cur1);
}
else {
- pv1 = tpv = (char*)bytes_to_utf8((const U8*)pv1, &cur1);
+ pv1 = tpv = (char*)bytes_to_utf8((U8*)pv1, &cur1);
}
}
}
STRLEN tmplen = -len;
is_utf8 = TRUE;
/* See the note in hv.c:hv_fetch() --jhi */
- src = (char*)bytes_from_utf8((const U8*)src, &tmplen, &is_utf8);
+ src = (char*)bytes_from_utf8((U8*)src, &tmplen, &is_utf8);
len = tmplen;
}
if (!hash)
if (SvREFCNT(rv) != 1 || (flags & SV_IMMEDIATE_UNREF))
SvREFCNT_dec(rv);
else /* XXX Hack, but hard to make $a=$a->[1] work otherwise */
- sv_2mortal(rv); /* Schedule for freeing later */
+ sv_2mortal((SV *)rv); /* Schedule for freeing later */
}
/*
if (!veclen)
continue;
if (vec_utf8)
- uv = utf8n_to_uvchr(vecstr, veclen, &ulen,
+ uv = utf8n_to_uvchr((U8 *)vecstr, veclen, &ulen,
UTF8_ALLOW_ANYUV);
else {
uv = *vecstr;
if (!veclen)
continue;
if (vec_utf8)
- uv = utf8n_to_uvchr(vecstr, veclen, &ulen,
+ uv = utf8n_to_uvchr((U8 *)vecstr, veclen, &ulen,
UTF8_ALLOW_ANYUV);
else {
uv = *vecstr;
{
const char file[] = __FILE__;
- newXS("attributes::bootstrap", XS_attributes_bootstrap, file);
+ newXS("attributes::bootstrap", XS_attributes_bootstrap, (char *)file);
}
#include "XSUB.h"
if( items > 1 )
Perl_croak(aTHX_ "Usage: attributes::bootstrap $module");
- newXSproto("attributes::_warn_reserved", XS_attributes__warn_reserved, file, "");
- newXS("attributes::_modify_attrs", XS_attributes__modify_attrs, file);
- newXSproto("attributes::_guess_stash", XS_attributes__guess_stash, file, "$");
- newXSproto("attributes::_fetch_attrs", XS_attributes__fetch_attrs, file, "$");
- newXSproto("attributes::reftype", XS_attributes_reftype, file, "$");
+ newXSproto("attributes::_warn_reserved", XS_attributes__warn_reserved, (char *)file, "");
+ newXS("attributes::_modify_attrs", XS_attributes__modify_attrs, (char *)file);
+ newXSproto("attributes::_guess_stash", XS_attributes__guess_stash, (char *)file, "$");
+ newXSproto("attributes::_fetch_attrs", XS_attributes__fetch_attrs, (char *)file, "$");
+ newXSproto("attributes::reftype", XS_attributes_reftype, (char *)file, "$");
XSRETURN(0);
}