diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2002-05-17 16:52:15 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-05-17 16:52:15 +0000 |
commit | 5afd6d4225c4773e6506b9fc3c8ca61abeea89a5 (patch) | |
tree | b4ae3bf910381858eed9b9c567b1cd88571362f0 /op.c | |
parent | b194b55204233387f5607cc8e73f91aec4b9abc2 (diff) | |
download | perl-5afd6d4225c4773e6506b9fc3c8ca61abeea89a5.tar.gz |
PERL_HASH() casting games so that our hashed data is "unsigned
char" but old code using just a "char" doesn't need changes.
(The change is using a temporary pointer instead of a direct
cast to unsigned char* which would blindly cast anything,
not just char pointers.) (The problem arose in MacOS Classic,
as seen by Pudge, the cure by Nicholas Clark.)
p4raw-id: //depot/perl@16656
Diffstat (limited to 'op.c')
-rw-r--r-- | op.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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), (U8*)SvPVX(meth), SvCUR(meth)); + PERL_HASH(SvUVX(meth), 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), (U8*)SvPVX(meth), SvCUR(meth)); + PERL_HASH(SvUVX(meth), 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), (U8*)SvPVX(meth), SvCUR(meth)); + PERL_HASH(SvUVX(meth), SvPVX(meth), SvCUR(meth)); imop = convert(OP_ENTERSUB, OPf_STACKED|OPf_SPECIAL, append_elem(OP_LIST, prepend_elem(OP_LIST, pack, list(arg)), |