summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-02-04 17:26:37 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-02-04 17:26:37 +0000
commitd2a79402699cee58f92911933abdc630babe73e5 (patch)
tree85a0c92bd1d8d34247acfb9b3f0728a27648313c
parenta5f3544725e2ae418d9a580320a1d4c303273681 (diff)
downloadperl-d2a79402699cee58f92911933abdc630babe73e5.tar.gz
avoid bad cast warnings (from Robin Barker <rmb1@cise.npl.co.uk>)
p4raw-id: //depot/perl@4986
-rw-r--r--sv.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sv.c b/sv.c
index 0697d8ed88..617d9a6207 100644
--- a/sv.c
+++ b/sv.c
@@ -6398,7 +6398,7 @@ void *
Perl_ptr_table_fetch(pTHX_ PTR_TBL_t *tbl, void *sv)
{
PTR_TBL_ENT_t *tblent;
- UV hash = (UV)sv;
+ UV hash = PTR2UV(sv);
assert(tbl);
tblent = tbl->tbl_ary[hash & tbl->tbl_max];
for (; tblent; tblent = tblent->next) {
@@ -6415,7 +6415,7 @@ Perl_ptr_table_store(pTHX_ PTR_TBL_t *tbl, void *oldv, void *newv)
/* XXX this may be pessimal on platforms where pointers aren't good
* hash values e.g. if they grow faster in the most significant
* bits */
- UV hash = (UV)oldv;
+ UV hash = PTR2UV(oldv);
bool i = 1;
assert(tbl);
@@ -6455,7 +6455,7 @@ Perl_ptr_table_split(pTHX_ PTR_TBL_t *tbl)
continue;
curentp = ary + oldsize;
for (entp = ary, ent = *ary; ent; ent = *entp) {
- if ((newsize & (UV)ent->oldval) != i) {
+ if ((newsize & PTR2UV(ent->oldval)) != i) {
*entp = ent->next;
ent->next = *curentp;
*curentp = ent;