diff options
author | Nicholas Clark <nick@ccl4.org> | 2021-08-20 15:20:13 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2021-10-11 11:30:25 +0000 |
commit | 94ee6ed79dbca73d0345b745534477e4017fb990 (patch) | |
tree | 2743d0b040c1dce45f0a921cccbaf3c324b71509 /hv.c | |
parent | 36149847e29e423be58d70fad50d9908be1d0373 (diff) | |
download | perl-94ee6ed79dbca73d0345b745534477e4017fb990.tar.gz |
Split the XPVHV body into two variants "normal" and "with aux"
Default to the smaller body, and switch to the larger body if we need to
allocate a C<struct xpvhv_aux> (eg need an iterator).
This restores the previous small size optimisation for hashes used as
objects.
Diffstat (limited to 'hv.c')
-rw-r--r-- | hv.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -2208,8 +2208,7 @@ S_hv_auxinit(pTHX_ HV *hv) { Renew(array, PERL_HV_ARRAY_ALLOC_BYTES(HvMAX(hv) + 1), char); } HvARRAY(hv) = (HE**)array; - SvOOK_on(hv); - iter = HvAUX(hv); + iter = Perl_hv_auxalloc(aTHX_ hv); #ifdef PERL_HASH_RANDOMIZE_KEYS if (PL_HASH_RAND_BITS_ENABLED) { /* mix in some new state to PL_hash_rand_bits to "randomize" the traversal order*/ |