summaryrefslogtreecommitdiff
path: root/sv.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 /sv.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 'sv.c')
-rw-r--r--sv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sv.c b/sv.c
index 5992a69b2f..ff53fae0a2 100644
--- a/sv.c
+++ b/sv.c
@@ -6338,7 +6338,7 @@ Perl_newSVpvn_share(pTHX_ const char *src, I32 len, U32 hash)
len = tmplen;
}
if (!hash)
- PERL_HASH(hash, (U8*)src, len);
+ PERL_HASH(hash, src, len);
new_SV(sv);
sv_upgrade(sv, SVt_PVIV);
SvPVX(sv) = sharepvn(src, is_utf8?-len:len, hash);