diff options
author | Nicholas Clark <nick@ccl4.org> | 2021-07-22 08:22:05 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2021-10-11 11:30:25 +0000 |
commit | 53a41f9c2c0671d8e97b2d47afa3130fe376f322 (patch) | |
tree | b68dbbbd2193f1198dbf18d0f7e79272885ef94e /hv.h | |
parent | cf927cca44ddf2f1b26c43b9d31ad08db4e46dab (diff) | |
download | perl-53a41f9c2c0671d8e97b2d47afa3130fe376f322.tar.gz |
Inline the xhv_aux struct in the main hash body
For now, memory for this structure is always allocated, even though it
isn't always flagged as being present.
Diffstat (limited to 'hv.h')
-rw-r--r-- | hv.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -137,6 +137,7 @@ struct xpvhv { union _xmgu xmg_u; STRLEN xhv_keys; /* total keys, including placeholders */ STRLEN xhv_max; /* subscript of last element of xhv_array */ + struct xpvhv_aux xhv_aux; }; /* @@ -275,7 +276,7 @@ See L</hv_fill>. #define HvMAX(hv) ((XPVHV*) SvANY(hv))->xhv_max /* This quite intentionally does no flag checking first. That's your responsibility. */ -#define HvAUX(hv) ((struct xpvhv_aux*)&(HvARRAY(hv)[HvMAX(hv)+1])) +#define HvAUX(hv) (&(((XPVHV*) SvANY(hv))->xhv_aux)) #define HvRITER(hv) (*Perl_hv_riter_p(aTHX_ MUTABLE_HV(hv))) #define HvEITER(hv) (*Perl_hv_eiter_p(aTHX_ MUTABLE_HV(hv))) #define HvRITER_set(hv,r) Perl_hv_riter_set(aTHX_ MUTABLE_HV(hv), r) |