This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
undeprecate hv_bucket_ratio()
authorDavid Mitchell <davem@iabyn.com>
Thu, 7 Jul 2016 08:40:22 +0000 (09:40 +0100)
committerDavid Mitchell <davem@iabyn.com>
Thu, 7 Jul 2016 08:40:22 +0000 (09:40 +0100)
This function was recently added, but marked as deprecated in embed.fnc.
Based on this thread:

    http://nntp.perl.org/group/perl.perl5.porters/237486

It looks like the 'M' (may change) flag is sufficient to capture what was
intended. Removing the 'D' avoids every usage in core emitting a warning
to STDERR during build, while it still adds a caution to the entry in
perlapi.pod:

    NOTE: this function is experimental and may change or be
    removed without notice.

embed.fnc
proto.h

index fe5eb68..88a70f9 100644 (file)
--- a/embed.fnc
+++ b/embed.fnc
@@ -2774,7 +2774,7 @@ Apod      |void   |hv_assert      |NN HV *hv
 #endif
 
 ApdR   |SV*    |hv_scalar      |NN HV *hv
-ApdRMD |SV*    |hv_bucket_ratio|NN HV *hv
+ApdRM  |SV*    |hv_bucket_ratio|NN HV *hv
 ApoR   |I32*   |hv_riter_p     |NN HV *hv
 ApoR   |HE**   |hv_eiter_p     |NN HV *hv
 Apo    |void   |hv_riter_set   |NN HV *hv|I32 riter
diff --git a/proto.h b/proto.h
index 9bdbac7..5c8f9d8 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -1118,7 +1118,6 @@ PERL_CALLCONV AV**        Perl_hv_backreferences_p(pTHX_ HV *hv);
 #define PERL_ARGS_ASSERT_HV_BACKREFERENCES_P   \
        assert(hv)
 PERL_CALLCONV SV*      Perl_hv_bucket_ratio(pTHX_ HV *hv)
-                       __attribute__deprecated__
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_HV_BUCKET_RATIO       \
        assert(hv)