summaryrefslogtreecommitdiffstats
path: root/src/eval.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-01-26 19:26:46 +0100
committerBram Moolenaar <Bram@vim.org>2020-01-26 19:26:46 +0100
commit21b9e9773d64de40994f8762173bdd8befa6acf7 (patch)
tree4aa50f453c1dda97881a6bb3153e2246bc4a95ed /src/eval.c
parentb3de5114acdc5859cf068d5fde9d7cb2bb34aa31 (diff)
patch 8.2.0154: reallocating the list of scripts is inefficientv8.2.0154
Problem: Reallocating the list of scripts is inefficient. Solution: Instead of using a growarray of scriptitem_T, store pointers and allocate each scriptitem_T separately. Also avoids that the growarray pointers change when sourcing a new script.
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/eval.c b/src/eval.c
index 72f932498b..a9d0c7d4c4 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -692,7 +692,7 @@ get_lval(
if (current_sctx.sc_version == SCRIPT_VERSION_VIM9 && *p == ':')
{
- scriptitem_T *si = &SCRIPT_ITEM(current_sctx.sc_sid);
+ scriptitem_T *si = SCRIPT_ITEM(current_sctx.sc_sid);
char_u *tp = skipwhite(p + 1);
// parse the type after the name