Problem: "safe" argument of call_vim_function() is always FALSE.
Solution: Remove the argument.
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)
{
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));
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);
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);
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));
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)
*/
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)
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;
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
/* 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);
}
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;
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);
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 233,
/**/
232,
/**/