From: Jarkko Hietaniemi Date: Sat, 11 May 2002 19:46:23 +0000 (+0000) Subject: Explicit casts due to #16542. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a6bdc2eb98f4e9bd74b51ad84203021dea610d6b;p=p5sagit%2Fp5-mst-13.2.git Explicit casts due to #16542. p4raw-id: //depot/perl@16547 --- diff --git a/ext/B/B.xs b/ext/B/B.xs index 83c9c4a..0bae084 100644 --- a/ext/B/B.xs +++ b/ext/B/B.xs @@ -575,7 +575,7 @@ hash(sv) U32 hash = 0; char hexhash[19]; /* must fit "0xffffffffffffffff" plus trailing \0 */ s = SvPV(sv, len); - PERL_HASH(hash, s, len); + PERL_HASH(hash, (U8*)s, len); sprintf(hexhash, "0x%"UVxf, (UV)hash); ST(0) = sv_2mortal(newSVpv(hexhash, 0)); diff --git a/hv.c b/hv.c index 6d8461f..f1d5583 100644 --- a/hv.c +++ b/hv.c @@ -251,7 +251,7 @@ S_hv_fetch_flags(pTHX_ HV *hv, const char *key, I32 klen, I32 lval, int flags) } } - PERL_HASH(hash, key, klen); + PERL_HASH(hash, (U8*)key, klen); /* entry = (HvARRAY(hv))[hash & (I32) HvMAX(hv)]; */ entry = ((HE**)xhv->xhv_array)[hash & (I32) xhv->xhv_max]; @@ -410,7 +410,7 @@ Perl_hv_fetch_ent(pTHX_ HV *hv, SV *keysv, I32 lval, register U32 hash) } if (!hash) - PERL_HASH(hash, key, klen); + PERL_HASH(hash, (U8*)key, klen); /* entry = (HvARRAY(hv))[hash & (I32) HvMAX(hv)]; */ entry = ((HE**)xhv->xhv_array)[hash & (I32) xhv->xhv_max]; @@ -578,7 +578,7 @@ Perl_hv_store_flags(pTHX_ HV *hv, const char *key, I32 klen, SV *val, HvHASKFLAGS_on((SV*)hv); if (!hash) - PERL_HASH(hash, key, klen); + PERL_HASH(hash, (U8*)key, klen); if (!xhv->xhv_array /* !HvARRAY(hv) */) Newz(505, xhv->xhv_array /* HvARRAY(hv) */, @@ -738,7 +738,7 @@ Perl_hv_store_ent(pTHX_ HV *hv, SV *keysv, SV *val, U32 hash) } if (!hash) - PERL_HASH(hash, key, klen); + PERL_HASH(hash, (U8*)key, klen); if (!xhv->xhv_array /* !HvARRAY(hv) */) Newz(505, xhv->xhv_array /* HvARRAY(hv) */, @@ -882,7 +882,7 @@ Perl_hv_delete(pTHX_ HV *hv, const char *key, I32 klen, I32 flags) k_flags |= HVhek_FREEKEY; } - PERL_HASH(hash, key, klen); + PERL_HASH(hash, (U8*)key, klen); /* oentry = &(HvARRAY(hv))[hash & (I32) HvMAX(hv)]; */ oentry = &((HE**)xhv->xhv_array)[hash & (I32) xhv->xhv_max]; @@ -1038,7 +1038,7 @@ Perl_hv_delete_ent(pTHX_ HV *hv, SV *keysv, I32 flags, U32 hash) } if (!hash) - PERL_HASH(hash, key, klen); + PERL_HASH(hash, (U8*)key, klen); /* oentry = &(HvARRAY(hv))[hash & (I32) HvMAX(hv)]; */ oentry = &((HE**)xhv->xhv_array)[hash & (I32) xhv->xhv_max]; @@ -1185,7 +1185,7 @@ Perl_hv_exists(pTHX_ HV *hv, const char *key, I32 klen) k_flags |= HVhek_FREEKEY; } - PERL_HASH(hash, key, klen); + PERL_HASH(hash, (U8*)key, klen); #ifdef DYNAMIC_ENV_FETCH if (!xhv->xhv_array /* !HvARRAY(hv) */) entry = Null(HE*); @@ -1290,7 +1290,7 @@ Perl_hv_exists_ent(pTHX_ HV *hv, SV *keysv, U32 hash) k_flags |= HVhek_FREEKEY; } if (!hash) - PERL_HASH(hash, key, klen); + PERL_HASH(hash, (U8*)key, klen); #ifdef DYNAMIC_ENV_FETCH if (!xhv->xhv_array /* !HvARRAY(hv) */) entry = Null(HE*); diff --git a/op.c b/op.c index 8ee4e31..d63b2a3 100644 --- a/op.c +++ b/op.c @@ -2011,7 +2011,7 @@ S_apply_attrs_my(pTHX_ HV *stash, OP *target, OP *attrs, OP **imopsp) meth = newSVpvn("import", 6); (void)SvUPGRADE(meth, SVt_PVIV); (void)SvIOK_on(meth); - PERL_HASH(SvUVX(meth), SvPVX(meth), SvCUR(meth)); + PERL_HASH(SvUVX(meth), (U8*)SvPVX(meth), SvCUR(meth)); imop = convert(OP_ENTERSUB, OPf_STACKED|OPf_SPECIAL|OPf_WANT_VOID, append_elem(OP_LIST, prepend_elem(OP_LIST, pack, list(arg)), @@ -3402,7 +3402,7 @@ Perl_utilize(pTHX_ int aver, I32 floor, OP *version, OP *id, OP *arg) meth = newSVpvn("VERSION",7); sv_upgrade(meth, SVt_PVIV); (void)SvIOK_on(meth); - PERL_HASH(SvUVX(meth), SvPVX(meth), SvCUR(meth)); + PERL_HASH(SvUVX(meth), (U8*)SvPVX(meth), SvCUR(meth)); veop = convert(OP_ENTERSUB, OPf_STACKED|OPf_SPECIAL, append_elem(OP_LIST, prepend_elem(OP_LIST, pack, list(version)), @@ -3426,7 +3426,7 @@ Perl_utilize(pTHX_ int aver, I32 floor, OP *version, OP *id, OP *arg) meth = aver ? newSVpvn("import",6) : newSVpvn("unimport", 8);; (void)SvUPGRADE(meth, SVt_PVIV); (void)SvIOK_on(meth); - PERL_HASH(SvUVX(meth), SvPVX(meth), SvCUR(meth)); + PERL_HASH(SvUVX(meth), (U8*)SvPVX(meth), SvCUR(meth)); imop = convert(OP_ENTERSUB, OPf_STACKED|OPf_SPECIAL, append_elem(OP_LIST, prepend_elem(OP_LIST, pack, list(arg)), diff --git a/sv.c b/sv.c index 225ee06..7e6bc2d 100644 --- a/sv.c +++ b/sv.c @@ -6336,7 +6336,7 @@ Perl_newSVpvn_share(pTHX_ const char *src, I32 len, U32 hash) len = tmplen; } if (!hash) - PERL_HASH(hash, src, len); + PERL_HASH(hash, (U8*)src, len); new_SV(sv); sv_upgrade(sv, SVt_PVIV); SvPVX(sv) = sharepvn(src, is_utf8?-len:len, hash);