aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_getln.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-08-29 23:25:16 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-08-30 00:24:46 -0400
commit97c1775646b87e7127a93daa13aab3d09e8e4b88 (patch)
treee68f5095f44dcbee66263df40798524875d1d8fc /src/nvim/ex_getln.c
parentf575b714499bf74ca99597fc5d115395e14dfcd1 (diff)
downloadrneovim-97c1775646b87e7127a93daa13aab3d09e8e4b88.tar.gz
rneovim-97c1775646b87e7127a93daa13aab3d09e8e4b88.tar.bz2
rneovim-97c1775646b87e7127a93daa13aab3d09e8e4b88.zip
vim-patch:8.1.0233: "safe" argument of call_vim_function() is always FALSE
Problem: "safe" argument of call_vim_function() is always FALSE. Solution: Remove the argument. https://github.com/vim/vim/commit/ded27a1febda3db7447958b60a7d791af514d124
Diffstat (limited to 'src/nvim/ex_getln.c')
-rw-r--r--src/nvim/ex_getln.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c
index 2b01e2d72b..4e43e95c2e 100644
--- a/src/nvim/ex_getln.c
+++ b/src/nvim/ex_getln.c
@@ -198,10 +198,7 @@ static Array cmdline_block = ARRAY_DICT_INIT;
/*
* Type used by call_user_expand_func
*/
-typedef void *(*user_expand_func_T)(const char_u *,
- int,
- typval_T *,
- bool);
+typedef void *(*user_expand_func_T)(const char_u *, int, typval_T *);
static histentry_T *(history[HIST_COUNT]) = {NULL, NULL, NULL, NULL, NULL};
static int hisidx[HIST_COUNT] = {-1, -1, -1, -1, -1}; /* lastused entry */
@@ -5059,12 +5056,12 @@ static void expand_shellcmd(char_u *filepat, int *num_file, char_u ***file,
/// return the result (either a string or a List).
static void * call_user_expand_func(user_expand_func_T user_expand_func,
expand_T *xp, int *num_file, char_u ***file)
+ FUNC_ATTR_NONNULL_ALL
{
char_u keep = 0;
typval_T args[4];
char_u *pat = NULL;
int save_current_SID = current_SID;
- void *ret;
struct cmdline_info save_ccline;
if (xp->xp_arg == NULL || xp->xp_arg[0] == '\0' || xp->xp_line == NULL)
@@ -5092,10 +5089,7 @@ static void * call_user_expand_func(user_expand_func_T user_expand_func,
ccline.cmdprompt = NULL;
current_SID = xp->xp_scriptID;
- ret = user_expand_func(xp->xp_arg,
- 3,
- args,
- false);
+ void *const ret = user_expand_func(xp->xp_arg, 3, args);
ccline = save_ccline;
current_SID = save_current_SID;