diff options
author | Yves Orton <demerphq@gmail.com> | 2016-08-08 20:06:01 +0200 |
---|---|---|
committer | Yves Orton <demerphq@gmail.com> | 2016-08-14 11:44:20 +0200 |
commit | 48c0e89d40bfde5337dd013112467554427c1279 (patch) | |
tree | 572a83d8c5ae64cf0e42deff697ee5dd38029bf2 /universal.c | |
parent | e6d22c5d932ba725d7851ee69fe506e478c913db (diff) | |
download | perl-48c0e89d40bfde5337dd013112467554427c1279.tar.gz |
Move hash introspection routines into Hash::Util/Util.xs and out of universal.c
Diffstat (limited to 'universal.c')
-rw-r--r-- | universal.c | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/universal.c b/universal.c index f0919b3544..e77fad3605 100644 --- a/universal.c +++ b/universal.c @@ -752,68 +752,6 @@ XS(XS_PerlIO_get_layers) XSRETURN(0); } -XS(XS_Hash_Util_bucket_ratio); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Hash_Util_bucket_ratio) -{ - dXSARGS; - SV *rhv; - PERL_UNUSED_VAR(cv); - - if (items != 1) - croak_xs_usage(cv, "hv"); - - rhv= ST(0); - if (SvROK(rhv)) { - rhv= SvRV(rhv); - if ( SvTYPE(rhv)==SVt_PVHV ) { - SV *ret= Perl_hv_bucket_ratio(aTHX_ (HV*)rhv); - ST(0)= ret; - XSRETURN(1); - } - } - XSRETURN_UNDEF; -} - -XS(XS_Hash_Util_num_buckets); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Hash_Util_num_buckets) -{ - dXSARGS; - SV *rhv; - PERL_UNUSED_VAR(cv); - - if (items != 1) - croak_xs_usage(cv, "hv"); - - rhv= ST(0); - if (SvROK(rhv)) { - rhv= SvRV(rhv); - if ( SvTYPE(rhv)==SVt_PVHV ) { - XSRETURN_UV(HvMAX((HV*)rhv)+1); - } - } - XSRETURN_UNDEF; -} - -XS(XS_Hash_Util_used_buckets); /* prototype to pass -Wmissing-prototypes */ -XS(XS_Hash_Util_used_buckets) -{ - dXSARGS; - SV *rhv; - PERL_UNUSED_VAR(cv); - - if (items != 1) - croak_xs_usage(cv, "hv"); - - rhv= ST(0); - if (SvROK(rhv)) { - rhv= SvRV(rhv); - if ( SvTYPE(rhv)==SVt_PVHV ) { - XSRETURN_UV(HvFILL((HV*)rhv)); - } - } - XSRETURN_UNDEF; -} - XS(XS_re_is_regexp); /* prototype to pass -Wmissing-prototypes */ XS(XS_re_is_regexp) { @@ -1066,9 +1004,6 @@ static const struct xsub_details details[] = { {"Internals::SvREFCNT", XS_Internals_SvREFCNT, "\\[$%@];$"}, {"constant::_make_const", XS_constant__make_const, "\\[$@]"}, {"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, "\\%"}, - {"Hash::Util::used_buckets", XS_Hash_Util_used_buckets, "\\%"}, {"re::is_regexp", XS_re_is_regexp, "$"}, {"re::regname", XS_re_regname, ";$$"}, {"re::regnames", XS_re_regnames, ";$"}, |