summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/pp_hot.c b/pp_hot.c
index 6e7e384f18..17683ff000 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -2571,6 +2571,11 @@ PP(pp_aassign)
if (SvRMAGICAL(hash) || HvUSEDKEYS(hash))
hv_clear(hash);
+ /* "nelems" was converted to the number of pairs earlier. */
+ if (nelems > PERL_HASH_DEFAULT_HvMAX) {
+ hv_ksplit(hash, nelems);
+ }
+
/* now assign the keys and values to the hash */
dirty_tmps = FALSE;