diff options
author | Nicholas Clark <nick@ccl4.org> | 2003-11-02 22:32:21 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2003-11-02 22:32:21 +0000 |
commit | 8e90d776335dcf68d19230bed1f95b7f5237577b (patch) | |
tree | 14fe68a8ad25f9ca0668e5af866370647852a126 | |
parent | 4adfac04910258ae156d305cec3778a76f618ae6 (diff) | |
download | perl-8e90d776335dcf68d19230bed1f95b7f5237577b.tar.gz |
Provide Internals::new_hash_seed to return PL_new_hash_seed, and
make Hash::Util::hash_seed use this.
p4raw-id: //depot/perl@21634
-rw-r--r-- | lib/Hash/Util.pm | 2 | ||||
-rw-r--r-- | universal.c | 11 |
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; |