summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-05-17 16:52:15 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-05-17 16:52:15 +0000
commit5afd6d4225c4773e6506b9fc3c8ca61abeea89a5 (patch)
treeb4ae3bf910381858eed9b9c567b1cd88571362f0 /op.c
parentb194b55204233387f5607cc8e73f91aec4b9abc2 (diff)
downloadperl-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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/op.c b/op.c
index d63b2a38d3..8ee4e3123b 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), (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)),