summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Hash/Util.pm2
-rw-r--r--universal.c11
2 files changed, 12 insertions, 1 deletions
diff --git a/lib/Hash/Util.pm b/lib/Hash/Util.pm
index c5d30592ff..03308c8dd0 100644
--- a/lib/Hash/Util.pm
+++ b/lib/Hash/Util.pm
@@ -196,7 +196,7 @@ See also L<perlrun/PERL_HASH_SEED_DEBUG>.
=cut
sub hash_seed () {
- Internals::hash_seed();
+ Internals::new_hash_seed();
}
=back
diff --git a/universal.c b/universal.c
index 9a8ec1b254..e877b31b28 100644
--- a/universal.c
+++ b/universal.c
@@ -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;