From 10f9b9bf77ed09ee67da058d1ba1658a4ce67626 Mon Sep 17 00:00:00 2001 From: Yves Orton Date: Mon, 8 Aug 2016 18:53:20 +0200 Subject: move Internals::hv_clear_placeholders() to Hash::Util::_clear_placeholders() There is no reason for this code to be in Internals:: or in universal.c at all, it should only be used from Hash::Util during things like lock_keys(). Moves the function to the XS code in Hash::Util, and renames it as well, along with commented out documentation for what it does. --- universal.c | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'universal.c') diff --git a/universal.c b/universal.c index 39745d98c4..b4ae238882 100644 --- a/universal.c +++ b/universal.c @@ -627,20 +627,6 @@ XS(XS_Internals_SvREFCNT) /* This is dangerous stuff. */ } -XS(XS_Internals_hv_clear_placehold); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Internals_hv_clear_placehold) -{ - dXSARGS; - - if (items != 1 || !SvROK(ST(0))) - croak_xs_usage(cv, "hv"); - else { - HV * const hv = MUTABLE_HV(SvRV(ST(0))); - hv_clear_placeholders(hv); - XSRETURN(0); - } -} - XS(XS_PerlIO_get_layers); /* prototype to pass -Wmissing-prototypes */ XS(XS_PerlIO_get_layers) { @@ -1079,7 +1065,6 @@ static const struct xsub_details details[] = { {"Internals::SvREADONLY", XS_Internals_SvREADONLY, "\\[$%@];$"}, {"constant::_make_const", XS_constant__make_const, "\\[$@]"}, {"Internals::SvREFCNT", XS_Internals_SvREFCNT, "\\[$%@];$"}, - {"Internals::hv_clear_placeholders", XS_Internals_hv_clear_placehold, "\\%"}, {"PerlIO::get_layers", XS_PerlIO_get_layers, "*;@"}, {"Hash::Util::bucket_ratio", XS_hash_util_bucket_ratio, "\\%"}, {"Hash::Util::num_buckets", XS_hash_util_num_buckets, "\\%"}, -- cgit v1.2.1