summaryrefslogtreecommitdiff
path: root/src/if_py_both.h
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-05-13 22:44:22 +0200
committerBram Moolenaar <Bram@vim.org>2020-05-13 22:44:22 +0200
commit7e9f351b2e69b498c4ee5004d7459844e1ba191a (patch)
treedf0c0e40b5bf9ef43d9b1289573515f9de9d79a6 /src/if_py_both.h
parent37d1b4f9416973abe9f5a7c6b81540ca88fa8489 (diff)
downloadvim-git-7e9f351b2e69b498c4ee5004d7459844e1ba191a.tar.gz
patch 8.2.0751: Vim9: performance can be improvedv8.2.0751
Problem: Vim9: performance can be improved. Solution: Don't call break. Inline check for list materialize. Make an inline version of ga_grow().
Diffstat (limited to 'src/if_py_both.h')
-rw-r--r--src/if_py_both.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/if_py_both.h b/src/if_py_both.h
index a13a5e345..9f563f0af 100644
--- a/src/if_py_both.h
+++ b/src/if_py_both.h
@@ -785,7 +785,7 @@ VimToPython(typval_T *our_tv, int depth, PyObject *lookup_dict)
return NULL;
}
- range_list_materialize(list);
+ CHECK_LIST_MATERIALIZE(list);
FOR_ALL_LIST_ITEMS(list, curr)
{
if (!(newObj = VimToPython(&curr->li_tv, depth + 1, lookup_dict)))
@@ -2256,7 +2256,7 @@ ListNew(PyTypeObject *subtype, list_T *list)
return NULL;
self->list = list;
++list->lv_refcount;
- range_list_materialize(list);
+ CHECK_LIST_MATERIALIZE(list);
pyll_add((PyObject *)(self), &self->ref, &lastlist);
@@ -2824,7 +2824,7 @@ ListIter(ListObject *self)
return NULL;
}
- range_list_materialize(l);
+ CHECK_LIST_MATERIALIZE(l);
list_add_watch(l, &lii->lw);
lii->lw.lw_item = l->lv_first;
lii->list = l;
@@ -3021,7 +3021,7 @@ FunctionConstructor(PyTypeObject *subtype, PyObject *args, PyObject *kwargs)
return NULL;
}
argslist = argstv.vval.v_list;
- range_list_materialize(argslist);
+ CHECK_LIST_MATERIALIZE(argslist);
argc = argslist->lv_len;
if (argc != 0)