develooper Front page | perl.perl5.porters | Postings from October 2003

[PATCH] Internals::hash_seed() returns wrong value

Thread Next
From:
Jan Dubois
Date:
October 12, 2003 22:12
Subject:
[PATCH] Internals::hash_seed() returns wrong value
Message ID:
07ckovck8mp5e8tthmtbbcrpi2tj6q9eak@4ax.com
If you compile Perl with e.g. PERL_HASH_SEED=12345 then PERL_HASH() in
hv.h will use this constant and not use PL_hash_seed at all.  I think
Internals::hash_seed() (and Hash::Util::hash_seed()) are supposed to
return the value used by PERL_HASH() and not the value stored in
PL_hash_seed.

Cheers,
-Jan

Index: universal.c
--- universal.c.~1~    Sun Oct 12 21:57:54 2003
+++ universal.c        Sun Oct 12 21:57:54 2003
@@ -723,6 +723,6 @@
     /* Using dXSARGS would also have dITEM and dSP,
      * which define 2 unused local variables.  */
     dMARK; dAX;
-    XSRETURN_UV(PL_hash_seed);
+    XSRETURN_UV(PERL_HASH_SEED);
 }

End of Patch.

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About