summaryrefslogtreecommitdiff
path: root/hv.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2021-08-20 15:20:13 +0000
committerNicholas Clark <nick@ccl4.org>2021-10-11 11:30:25 +0000
commit94ee6ed79dbca73d0345b745534477e4017fb990 (patch)
tree2743d0b040c1dce45f0a921cccbaf3c324b71509 /hv.c
parent36149847e29e423be58d70fad50d9908be1d0373 (diff)
downloadperl-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.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/hv.c b/hv.c
index 954eb493d6..7e8f286859 100644
--- a/hv.c
+++ b/hv.c
@@ -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*/