Patch 9.0.1096
Problem:    Reallocating hashtab when the size didn't change.
Solution:   Bail out when the hashtab is already the desired size.
Files:      src/hashtab.c


*** ../vim-9.0.1095/src/hashtab.c       2022-11-25 16:31:46.964606667 +0000
--- src/hashtab.c       2022-12-25 20:37:49.499265193 +0000
***************
*** 405,410 ****
--- 405,414 ----
            return FAIL;        // overflow
      }
  
+     // bail out if the hashtab is already at the desired size
+     if (newsize == ht->ht_mask + 1)
+       return OK;
+ 
      if (newsize == HT_INIT_SIZE)
      {
        // Use the small array inside the hashdict structure.
*** ../vim-9.0.1095/src/version.c       2022-12-25 19:31:29.517203739 +0000
--- src/version.c       2022-12-25 20:36:54.499247471 +0000
***************
*** 697,698 ****
--- 697,700 ----
  {   /* Add new patch number below this line */
+ /**/
+     1096,
  /**/

-- 
Q: What's orange and sounds like a parrot?
A: A carrot

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20221225204721.DB6461C0AA3%40moolenaar.net.

Raspunde prin e-mail lui