summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-08-01 19:06:03 +0200
committerBram Moolenaar <Bram@vim.org>2018-08-01 19:06:03 +0200
commitded27a1febda3db7447958b60a7d791af514d124 (patch)
treed6187c6d409aafabad0aab6e76f97132a51fe640 /src
parentf711cb2f12458d32e082c0e3d4103e2b072947c3 (diff)
downloadvim-git-ded27a1febda3db7447958b60a7d791af514d124.tar.gz
patch 8.1.0233: "safe" argument of call_vim_function() is always FALSEv8.1.0233
Problem: "safe" argument of call_vim_function() is always FALSE. Solution: Remove the argument.
Diffstat (limited to 'src')
-rw-r--r--src/edit.c4
-rw-r--r--src/eval.c31
-rw-r--r--src/ex_getln.c4
-rw-r--r--src/mbyte.c4
-rw-r--r--src/normal.c2
-rw-r--r--src/proto/eval.pro8
-rw-r--r--src/version.c2
7 files changed, 20 insertions, 35 deletions
diff --git a/src/edit.c b/src/edit.c
index b0b44e606..daadc7b7b 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -4239,7 +4239,7 @@ expand_by_function(
curbuf_save = curbuf;
/* Call a function, which returns a list or dict. */
- if (call_vim_function(funcname, 2, args, &rettv, FALSE) == OK)
+ if (call_vim_function(funcname, 2, args, &rettv) == OK)
{
switch (rettv.v_type)
{
@@ -5569,7 +5569,7 @@ ins_complete(int c, int enable_pum)
pos = curwin->w_cursor;
curwin_save = curwin;
curbuf_save = curbuf;
- col = call_func_retnr(funcname, 2, args, FALSE);
+ col = call_func_retnr(funcname, 2, args);
if (curwin_save != curwin || curbuf_save != curbuf)
{
EMSG(_(e_complwin));
diff --git a/src/eval.c b/src/eval.c
index 6034cd24f..3a275213c 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -1021,29 +1021,15 @@ call_vim_function(
char_u *func,
int argc,
typval_T *argv,
- typval_T *rettv,
- int safe) /* use the sandbox */
+ typval_T *rettv)
{
int doesrange;
- void *save_funccalp = NULL;
int ret;
- if (safe)
- {
- save_funccalp = save_funccal();
- ++sandbox;
- }
-
rettv->v_type = VAR_UNKNOWN; /* clear_tv() uses this */
ret = call_func(func, (int)STRLEN(func), rettv, argc, argv, NULL,
curwin->w_cursor.lnum, curwin->w_cursor.lnum,
&doesrange, TRUE, NULL, NULL);
- if (safe)
- {
- --sandbox;
- restore_funccal(save_funccalp);
- }
-
if (ret == FAIL)
clear_tv(rettv);
@@ -1060,13 +1046,12 @@ call_vim_function(
call_func_retnr(
char_u *func,
int argc,
- typval_T *argv,
- int safe) /* use the sandbox */
+ typval_T *argv)
{
typval_T rettv;
varnumber_T retval;
- if (call_vim_function(func, argc, argv, &rettv, safe) == FAIL)
+ if (call_vim_function(func, argc, argv, &rettv) == FAIL)
return -1;
retval = get_tv_number_chk(&rettv, NULL);
@@ -1088,13 +1073,12 @@ call_func_retnr(
call_func_retstr(
char_u *func,
int argc,
- typval_T *argv,
- int safe) /* use the sandbox */
+ typval_T *argv)
{
typval_T rettv;
char_u *retval;
- if (call_vim_function(func, argc, argv, &rettv, safe) == FAIL)
+ if (call_vim_function(func, argc, argv, &rettv) == FAIL)
return NULL;
retval = vim_strsave(get_tv_string(&rettv));
@@ -1113,12 +1097,11 @@ call_func_retstr(
call_func_retlist(
char_u *func,
int argc,
- typval_T *argv,
- int safe) /* use the sandbox */
+ typval_T *argv)
{
typval_T rettv;
- if (call_vim_function(func, argc, argv, &rettv, safe) == FAIL)
+ if (call_vim_function(func, argc, argv, &rettv) == FAIL)
return NULL;
if (rettv.v_type != VAR_LIST)
diff --git a/src/ex_getln.c b/src/ex_getln.c
index e659c1a8c..54b37961f 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -5279,7 +5279,7 @@ expand_shellcmd(
*/
static void *
call_user_expand_func(
- void *(*user_expand_func)(char_u *, int, typval_T *, int),
+ void *(*user_expand_func)(char_u *, int, typval_T *),
expand_T *xp,
int *num_file,
char_u ***file)
@@ -5318,7 +5318,7 @@ call_user_expand_func(
ccline.cmdprompt = NULL;
current_SID = xp->xp_scriptID;
- ret = user_expand_func(xp->xp_arg, 3, args, FALSE);
+ ret = user_expand_func(xp->xp_arg, 3, args);
ccline = save_ccline;
current_SID = save_current_SID;
diff --git a/src/mbyte.c b/src/mbyte.c
index 1f85246f0..96b39b411 100644
--- a/src/mbyte.c
+++ b/src/mbyte.c
@@ -4825,7 +4825,7 @@ call_imactivatefunc(int active)
argv[0].v_type = VAR_NUMBER;
argv[0].vval.v_number = active ? 1 : 0;
argv[1].v_type = VAR_UNKNOWN;
- (void)call_func_retnr(p_imaf, 1, argv, FALSE);
+ (void)call_func_retnr(p_imaf, 1, argv);
}
static int
@@ -4839,7 +4839,7 @@ call_imstatusfunc(void)
/* FIXME: :py print 'xxx' is shown duplicate result.
* Use silent to avoid it. */
++msg_silent;
- is_active = call_func_retnr(p_imsf, 0, NULL, FALSE);
+ is_active = call_func_retnr(p_imsf, 0, NULL);
--msg_silent;
return (is_active > 0);
}
diff --git a/src/normal.c b/src/normal.c
index f3cd664a6..41c762332 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -2248,7 +2248,7 @@ op_function(oparg_T *oap UNUSED)
virtual_op = MAYBE;
# endif
- (void)call_func_retnr(p_opfunc, 1, argv, FALSE);
+ (void)call_func_retnr(p_opfunc, 1, argv);
# ifdef FEAT_VIRTUALEDIT
virtual_op = save_virtual_op;
diff --git a/src/proto/eval.pro b/src/proto/eval.pro
index 98f665671..537b6490a 100644
--- a/src/proto/eval.pro
+++ b/src/proto/eval.pro
@@ -19,10 +19,10 @@ varnumber_T eval_to_number(char_u *expr);
list_T *eval_spell_expr(char_u *badword, char_u *expr);
int get_spellword(list_T *list, char_u **pp);
typval_T *eval_expr(char_u *arg, char_u **nextcmd);
-int call_vim_function(char_u *func, int argc, typval_T *argv, typval_T *rettv, int safe);
-varnumber_T call_func_retnr(char_u *func, int argc, typval_T *argv, int safe);
-void *call_func_retstr(char_u *func, int argc, typval_T *argv, int safe);
-void *call_func_retlist(char_u *func, int argc, typval_T *argv, int safe);
+int call_vim_function(char_u *func, int argc, typval_T *argv, typval_T *rettv);
+varnumber_T call_func_retnr(char_u *func, int argc, typval_T *argv);
+void *call_func_retstr(char_u *func, int argc, typval_T *argv);
+void *call_func_retlist(char_u *func, int argc, typval_T *argv);
int eval_foldexpr(char_u *arg, int *cp);
void ex_let(exarg_T *eap);
void list_hashtable_vars(hashtab_T *ht, char_u *prefix, int empty, int *first);
diff --git a/src/version.c b/src/version.c
index 64aa76abb..6e6c3cdc7 100644
--- a/src/version.c
+++ b/src/version.c
@@ -795,6 +795,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 233,
+/**/
232,
/**/
231,