Provide Internals::new_hash_seed to return PL_new_hash_seed, and
Nicholas Clark [Sun, 2 Nov 2003 22:32:21 +0000 (22:32 +0000)]
make Hash::Util::hash_seed use this.

p4raw-id: //depot/perl@21634

lib/Hash/Util.pm
universal.c

index c5d3059..03308c8 100644 (file)
@@ -196,7 +196,7 @@ See also L<perlrun/PERL_HASH_SEED_DEBUG>.
 =cut
 
 sub hash_seed () {
-    Internals::hash_seed();
+    Internals::new_hash_seed();
 }
 
 =back
index 9a8ec1b..e877b31 100644 (file)
@@ -188,6 +188,7 @@ XS(XS_Internals_hv_clear_placehold);
 XS(XS_PerlIO_get_layers);
 XS(XS_Regexp_DESTROY);
 XS(XS_Internals_hash_seed);
+XS(XS_Internals_new_hash_seed);
 XS(XS_Internals_HvREHASH);
 
 void
@@ -233,6 +234,8 @@ Perl_boot_core_UNIVERSAL(pTHX)
                XS_PerlIO_get_layers, file, "*;@");
     newXS("Regexp::DESTROY", XS_Regexp_DESTROY, file);
     newXSproto("Internals::hash_seed",XS_Internals_hash_seed, file, "");
+    newXSproto("Internals::new_hash_seed",XS_Internals_new_hash_seed, file,
+              "");
     newXSproto("Internals::HvREHASH", XS_Internals_HvREHASH, file, "\\%");
 }
 
@@ -918,6 +921,14 @@ XS(XS_Internals_hash_seed)
     XSRETURN_UV(PERL_HASH_SEED);
 }
 
+XS(XS_Internals_new_hash_seed)
+{
+    /* Using dXSARGS would also have dITEM and dSP,
+     * which define 2 unused local variables.  */
+    dMARK; dAX;
+    XSRETURN_UV(PL_new_hash_seed);
+}
+
 XS(XS_Internals_HvREHASH)      /* Subject to change  */
 {
     dXSARGS;