-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;
-}
-