diff options
author | Nicholas Clark <nick@ccl4.org> | 2021-08-26 10:34:59 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2021-08-26 10:34:59 +0000 |
commit | 9d1dc8e3bf4c4286d3d098f35f83be5d6c34478a (patch) | |
tree | f5a83d8ea9a76ff559aa2fc76ed6cccea7fe2c4a /hv.h | |
parent | 22d3134bffd0c8bced3098c4991490c087834987 (diff) | |
download | perl-9d1dc8e3bf4c4286d3d098f35f83be5d6c34478a.tar.gz |
Delete the macro XHvTOTALKEYS() which is unused and not in the API.
XHvTOTALKEYS() was added in Dec 2001 as part of commit 8aacddc1ea3837f8:
Tidied version of Jeffrey Friedl's <jfriedl@yahoo.com> restricted hashes
- added delete of READONLY value inhibit & test for same
- re-tabbed
It's not part of the API, and not used by any code on CPAN. The last (and
only) direct use was in Perl_hv_clear_placeholders(), and that was converted
to HvTOTALKEYS() in May 2005 as part of commit 5d88ecd7e75b7174:
Various HvPLACEHOLDERS() that should be HvPLACEHOLDERS_get()
Hence "inline" the macro XHvTOTALKEYS() into the macro HvTOTALKEYS(),
eliminating the only use of XHvTOTALKEYS().
Diffstat (limited to 'hv.h')
-rw-r--r-- | hv.h | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -333,9 +333,6 @@ See L</hv_fill>. ((SvOOK(hv) && HvAUX(hv)->xhv_name_u.xhvnameu_name && HvAUX(hv)->xhv_name_count != -1) \ ? HEK_UTF8(HvENAME_HEK_NN(hv)) : 0) -/* the number of keys (including any placeholders) - NOT PART OF THE API */ -#define XHvTOTALKEYS(xhv) ((xhv)->xhv_keys) - /* * HvKEYS gets the number of keys that actually exist(), and is provided * for backwards compatibility with old XS code. The core uses HvUSEDKEYS @@ -343,7 +340,7 @@ See L</hv_fill>. */ #define HvKEYS(hv) HvUSEDKEYS(hv) #define HvUSEDKEYS(hv) (HvTOTALKEYS(hv) - HvPLACEHOLDERS_get(hv)) -#define HvTOTALKEYS(hv) XHvTOTALKEYS((XPVHV*) SvANY(hv)) +#define HvTOTALKEYS(hv) (((XPVHV*) SvANY(hv))->xhv_keys) #define HvPLACEHOLDERS(hv) (*Perl_hv_placeholders_p(aTHX_ MUTABLE_HV(hv))) #define HvPLACEHOLDERS_get(hv) (SvMAGIC(hv) ? Perl_hv_placeholders_get(aTHX_ (const HV *)hv) : 0) #define HvPLACEHOLDERS_set(hv,p) Perl_hv_placeholders_set(aTHX_ MUTABLE_HV(hv), p) |