Mercurial > vim
diff src/list.c @ 19916:dcec86d796bc v8.2.0514
patch 8.2.0514: several global functions are used in only one file
Commit: https://github.com/vim/vim/commit/bdff012f4416c75e65950a19688533c4def5abf6
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Apr 5 18:56:05 2020 +0200
patch 8.2.0514: several global functions are used in only one file
Problem: Several global functions are used in only one file.
Solution: Make the functions static. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/5884)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 05 Apr 2020 19:00:37 +0200 |
parents | 435726a03481 |
children | 3ff714d765ba |
line wrap: on
line diff
--- a/src/list.c +++ b/src/list.c @@ -20,6 +20,8 @@ static char *e_listblobarg = N_("E899: A // List heads for garbage collection. static list_T *first_list = NULL; // list of all lists +static void list_free_item(list_T *l, listitem_T *item); + /* * Add a watcher to a list. */ @@ -311,7 +313,7 @@ listitem_alloc(void) * Free a list item, unless it was allocated together with the list itself. * Does not clear the value. Does not notify watchers. */ - void + static void list_free_item(list_T *l, listitem_T *item) { if (l->lv_with_items == 0 || item < (listitem_T *)l @@ -1225,7 +1227,7 @@ f_list2str(typval_T *argvars, typval_T * rettv->vval.v_string = ga.ga_data; } - void + static void list_remove(typval_T *argvars, typval_T *rettv, char_u *arg_errmsg) { list_T *l;