diff options
author | Nicholas Clark <nick@ccl4.org> | 2006-01-16 12:51:43 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2006-01-16 12:51:43 +0000 |
commit | 0126ccc7b0881ebd6ffb9dc9eaca0152046eff2e (patch) | |
tree | 29598914cdd7c61f5bf6a336ee1c2ea7206c2ebc | |
parent | bccaac156045cedac877d0f378dcfb2acc3fe489 (diff) | |
download | perl-0126ccc7b0881ebd6ffb9dc9eaca0152046eff2e.tar.gz |
Integrate:
[ 26315]
A better hash for PTR_TABLE_HASH (?)
p4raw-link: @26315 on //depot/perl: 7119fd33ffc5ef947b59b6096cf5249ee05d4397
p4raw-id: //depot/maint-5.8/perl@26860
p4raw-integrated: from //depot/perl@26315 'merge in' sv.c (@26313..)
-rw-r--r-- | sv.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -9812,11 +9812,8 @@ Perl_ptr_table_new(pTHX) return tbl; } -#if (PTRSIZE == 8) -# define PTR_TABLE_HASH(ptr) (PTR2UV(ptr) >> 3) -#else -# define PTR_TABLE_HASH(ptr) (PTR2UV(ptr) >> 2) -#endif +#define PTR_TABLE_HASH(ptr) \ + ((PTR2UV(ptr) >> 3) ^ (PTR2UV(ptr) >> (3 + 7)) ^ (PTR2UV(ptr) >> (3 + 17))) |