diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-03-01 14:04:46 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-03-01 14:04:46 +0100 |
commit | fbdd08ed9b1798885915c7f27c94786906d258e4 (patch) | |
tree | c228db6d29862aa4f3b7dbcdf19a009ceac12f4a | |
parent | f4f190d8219fc93c6e58e54ce7c1ac15af07840f (diff) |
patch 8.2.0339: Vim9: function return type may depend on argumentsv8.2.0339
Problem: Vim9: function return type may depend on arguments.
Solution: Instead of a fixed return type use a function to figure out the
return type.
-rw-r--r-- | src/evalbuffer.c | 6 | ||||
-rw-r--r-- | src/evalfunc.c | 1122 | ||||
-rw-r--r-- | src/proto/evalbuffer.pro | 1 | ||||
-rw-r--r-- | src/proto/evalfunc.pro | 2 | ||||
-rw-r--r-- | src/testdir/test_vim9_script.vim | 5 | ||||
-rw-r--r-- | src/version.c | 2 | ||||
-rw-r--r-- | src/vim9compile.c | 9 |
7 files changed, 628 insertions, 519 deletions
diff --git a/src/evalbuffer.c b/src/evalbuffer.c index d44fb10180..de6af6ad13 100644 --- a/src/evalbuffer.c +++ b/src/evalbuffer.c @@ -752,6 +752,12 @@ f_getbufline(typval_T *argvars, typval_T *rettv) get_buffer_lines(buf, lnum, end, TRUE, rettv); } + type_T * +ret_f_getline(int argcount, type_T **argtypes UNUSED) +{ + return argcount == 1 ? &t_string : &t_list_string; +} + /* * "getline(lnum, [end])" function */ diff --git a/src/evalfunc.c b/src/evalfunc.c index 39e347ad20..363ac69492 100644 --- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -264,6 +264,91 @@ static void f_windowsversion(typval_T *argvars, typval_T *rettv); static void f_wordcount(typval_T *argvars, typval_T *rettv); static void f_xor(typval_T *argvars, typval_T *rettv); + + static type_T * +ret_void(int argcount UNUSED, type_T **argtypes UNUSED) +{ + return &t_void; +} + static type_T * +ret_any(int argcount UNUSED, type_T **argtypes UNUSED) +{ + return &t_any; +} + static type_T * +ret_number(int argcount UNUSED, type_T **argtypes UNUSED) +{ + return &t_number; +} + static type_T * +ret_float(int argcount UNUSED, type_T **argtypes UNUSED) +{ + return &t_float; +} + static type_T * +ret_string(int argcount UNUSED, type_T **argtypes UNUSED) +{ + return &t_string; +} + static type_T * ret_list_any(int argcount UNUSED, type_T **argtypes UNUSED) +{ + return &t_list_any; +} + static type_T * +ret_list_number(int argcount UNUSED, type_T **argtypes UNUSED) +{ + return &t_list_number; +} + static type_T * +ret_list_string(int argcount UNUSED, type_T **argtypes UNUSED) +{ + return &t_list_string; +} + static type_T * +ret_list_dict_any(int argcount UNUSED, type_T **argtypes UNUSED) +{ + return &t_list_dict_any; +} + static type_T * +ret_dict_any(int argcount UNUSED, type_T **argtypes UNUSED) +{ + return &t_dict_any; +} + static type_T * +ret_dict_number(int argcount UNUSED, type_T **argtypes UNUSED) +{ + return &t_dict_number; +} + static type_T * +ret_dict_string(int argcount UNUSED, type_T **argtypes UNUSED) +{ + return &t_dict_string; +} + static type_T * +ret_blob(int argcount UNUSED, type_T **argtypes UNUSED) +{ + return &t_blob; +} + static type_T * +ret_partial_void(int argcount UNUSED, type_T **argtypes UNUSED) +{ + return &t_partial_void; +} +#ifdef FEAT_JOB_CHANNEL + static type_T * +ret_channel(int argcount UNUSED, type_T **argtypes UNUSED) +{ + return &t_channel; +} + static type_T * +ret_job(int argcount UNUSED, type_T **argtypes UNUSED) +{ + return &t_job; +} +#endif + +static type_T *ret_f_function(int argcount, type_T **argtypes); + /* * Array with names and number of arguments of all internal functions * MUST BE KEPT SORTED IN strcmp() ORDER FOR BINARY SEARCH! @@ -274,7 +359,8 @@ typedef struct char f_min_argc; // minimal number of arguments char f_max_argc; // maximal number of arguments char f_argtype; // for method: FEARG_ values - type_T *f_rettype; // return type + type_T *(*f_retfunc)(int argcount, type_T **argtypes); + // return type function void (*f_func)(typval_T *args, typval_T *rvar); // implementation of function } funcentry_T; @@ -289,585 +375,585 @@ typedef struct static funcentry_T global_functions[] = { #ifdef FEAT_FLOAT - {"abs", 1, 1, FEARG_1, &t_any, f_abs}, - {"acos", 1, 1, FEARG_1, &t_float, f_acos}, // WJMc -#endif - {"add", 2, 2, FEARG_1, &t_any, f_add}, - {"and", 2, 2, FEARG_1, &t_number, f_and}, - {"append", 2, 2, FEARG_LAST, &t_number, f_append}, - {"appendbufline", 3, 3, FEARG_LAST, &t_number, f_appendbufline}, - {"argc", 0, 1, 0, &t_number, f_argc}, - {"argidx", 0, 0, 0, &t_number, f_argidx}, - {"arglistid", 0, 2, 0, &t_number, f_arglistid}, - {"argv", 0, 2, 0, &t_any, f_argv}, + {"abs", 1, 1, FEARG_1, ret_any, f_abs}, + {"acos", 1, 1, FEARG_1, ret_float, f_acos}, // WJMc +#endif + {"add", 2, 2, FEARG_1, ret_any, f_add}, + {"and", 2, 2, FEARG_1, ret_number, f_and}, + {"append", 2, 2, FEARG_LAST, ret_number, f_append}, + {"appendbufline", 3, 3, FEARG_LAST, ret_number, f_appendbufline}, + {"argc", 0, 1, 0, ret_number, f_argc}, + {"argidx", 0, 0, 0, ret_number, f_argidx}, + {"arglistid", 0, 2, 0, ret_number, f_arglistid}, + {"argv", 0, 2, 0, ret_any, f_argv}, #ifdef FEAT_FLOAT - {"asin", 1, 1, FEARG_1, &t_float, f_asin}, // WJMc -#endif - {"assert_beeps", 1, 2, FEARG_1, &t_number, f_assert_beeps}, - {"assert_equal", 2, 3, FEARG_2, &t_number, f_assert_equal}, - {"assert_equalfile", 2, 2, FEARG_1, &t_number, f_assert_equalfile}, - {"assert_exception", 1, 2, 0, &t_number, f_assert_exception}, - {"assert_fails", 1, 3, FEARG_1, &t_number, f_assert_fails}, - {"assert_false", 1, 2, FEARG_1, &t_number, f_assert_false}, - {"assert_inrange", 3, 4, FEARG_3, &t_number, f_assert_inrange}, - {"assert_match", 2, 3, FEARG_2, &t_number, f_assert_match}, - {"assert_notequal", 2, 3, FEARG_2, &t_number, f_assert_notequal}, - {"assert_notmatch", 2, 3, FEARG_2, &t_number, f_assert_notmatch}, - {"assert_report", 1, 1, FEARG_1, &t_number, f_assert_report}, - {"assert_true", 1, 2, FEARG_1, &t_number, f_assert_true}, + {"asin", 1, 1, FEARG_1, ret_float, f_asin}, // WJMc +#endif + {"assert_beeps", 1, 2, FEARG_1, ret_number, f_assert_beeps}, + {"assert_equal", 2, 3, FEARG_2, ret_number, f_assert_equal}, + {"assert_equalfile", 2, 2, FEARG_1, ret_number, f_assert_equalfile}, + {"assert_exception", 1, 2, 0, ret_number, f_assert_exception}, + {"assert_fails", 1, 3, FEARG_1, ret_number, f_assert_fails}, + {"assert_false", 1, 2, FEARG_1, ret_number, f_assert_false}, + {"assert_inrange", 3, 4, FEARG_3, ret_number, f_assert_inrange}, + {"assert_match", 2, 3, FEARG_2, ret_number, f_assert_match}, + {"assert_notequal", 2, 3, FEARG_2, ret_number, f_assert_notequal}, + {"assert_notmatch", 2, 3, FEARG_2, ret_number, f_assert_notmatch}, + {"assert_report", 1, 1, FEARG_1, ret_number, f_assert_report}, + {"assert_true", 1, 2, FEARG_1, ret_number, f_assert_true}, #ifdef FEAT_FLOAT - {"atan", 1, 1, FEARG_1, &t_float, f_atan}, - {"atan2", 2, 2, FEARG_1, &t_float, f_atan2}, + {"atan", 1, 1, FEARG_1, ret_float, f_atan}, + {"atan2", 2, 2, FEARG_1, ret_float, f_atan2}, #endif #ifdef FEAT_BEVAL - {"balloon_gettext", 0, 0, 0, &t_string, f_balloon_gettext}, - {"balloon_show", 1, 1, FEARG_1, &t_void, f_balloon_show}, + {"balloon_gettext", 0, 0, 0, ret_string, f_balloon_gettext}, + {"balloon_show", 1, 1, FEARG_1, ret_void, f_balloon_show}, # if defined(FEAT_BEVAL_TERM) - {"balloon_split", 1, 1, FEARG_1, &t_list_string, f_balloon_split}, + {"balloon_split", 1, 1, FEARG_1, ret_list_string, f_balloon_split}, # endif #endif - {"browse", 4, 4, 0, &t_string, f_browse}, - {"browsedir", 2, 2, 0, &t_string, f_browsedir}, - {"bufadd", 1, 1, FEARG_1, &t_number, f_bufadd}, - {"bufexists", 1, 1, FEARG_1, &t_number, f_bufexists}, - {"buffer_exists", 1, 1, FEARG_1, &t_number, f_bufexists}, // obsolete - {"buffer_name", 0, 1, FEARG_1, &t_string, f_bufname}, // obsolete - {"buffer_number", 0, 1, FEARG_1, &t_number, f_bufnr}, // obsolete - {"buflisted", 1, 1, FEARG_1, &t_number, f_buflisted}, - {"bufload", 1, 1, FEARG_1, &t_void, f_bufload}, - {"bufloaded", 1, 1, FEARG_1, &t_number, f_bufloaded}, - {"bufname", 0, 1, FEARG_1, &t_string, f_bufname}, - {"bufnr", 0, 2, FEARG_1, &t_number, f_bufnr}, - {"bufwinid", 1, 1, FEARG_1, &t_number, f_bufwinid}, - {"bufwinnr", 1, 1, FEARG_1, &t_number, f_bufwinnr}, - {"byte2line", 1, 1, FEARG_1, &t_number, f_byte2line}, - {"byteidx", 2, 2, FEARG_1, &t_number, f_byteidx}, - {"byteidxcomp", 2, 2, FEARG_1, &t_number, f_byteidxcomp}, - {"call", 2, 3, FEARG_1, &t_any, f_call}, + {"browse", 4, 4, 0, ret_string, f_browse}, + {"browsedir", 2, 2, 0, ret_string, f_browsedir}, + {"bufadd", 1, 1, FEARG_1, ret_number, f_bufadd}, + {"bufexists", 1, 1, FEARG_1, ret_number, f_bufexists}, + {"buffer_exists", 1, 1, FEARG_1, ret_number, f_bufexists}, // obsolete + {"buffer_name", 0, 1, FEARG_1, ret_string, f_bufname}, // obsolete + {"buffer_number", 0, 1, FEARG_1, ret_number, f_bufnr}, // obsolete + {"buflisted", 1, 1, FEARG_1, ret_number, f_buflisted}, + {"bufload", 1, 1, FEARG_1, ret_void, f_bufload}, + {"bufloaded", 1, 1, FEARG_1, ret_number, f_bufloaded}, + {"bufname", 0, 1, FEARG_1, ret_string, f_bufname}, + {"bufnr", 0, 2, FEARG_1, ret_number, f_bufnr}, + {"bufwinid", 1, 1, FEARG_1, ret_number, f_bufwinid}, + {"bufwinnr", 1, 1, FEARG_1, ret_number, f_bufwinnr}, + {"byte2line", 1, 1, FEARG_1, ret_number, f_byte2line}, + {"byteidx", 2, 2, FEARG_1, ret_number, f_byteidx}, + {"byteidxcomp", 2, 2, FEARG_1, ret_number, f_byteidxcomp}, + {"call", 2, 3, FEARG_1, ret_any, f_call}, #ifdef FEAT_FLOAT - {"ceil", 1, 1, FEARG_1, &t_float, f_ceil}, + {"ceil", 1, 1, FEARG_1, ret_float, f_ceil}, #endif #ifdef FEAT_JOB_CHANNEL - {"ch_canread", 1, 1, FEARG_1, &t_number, f_ch_canread}, - {"ch_close", 1, 1, FEARG_1, &t_void, f_ch_close}, - {"ch_close_in", 1, 1, FEARG_1, &t_void, f_ch_close_in}, - {"ch_evalexpr", 2, 3, FEARG_1, &t_any, f_ch_evalexpr}, - {"ch_evalraw", 2, 3, FEARG_1, &t_any, f_ch_evalraw}, - {"ch_getbufnr", 2, 2, FEARG_1, &t_number, f_ch_getbufnr}, - {"ch_getjob", 1, 1, FEARG_1, &t_job, f_ch_getjob}, - {"ch_info", 1, 1, FEARG_1, &t_dict_any, f_ch_info}, - {"ch_log", 1, 2, FEARG_1, &t_void, f_ch_log}, - {"ch_logfile", 1, 2, FEARG_1, &t_void, f_ch_logfile}, - {"ch_open", 1, 2, FEARG_1, &t_channel, f_ch_open}, - {"ch_read", 1, 2, FEARG_1, &t_string, f_ch_read}, - {"ch_readblob", 1, 2, FEARG_1, &t_blob, f_ch_readblob}, - {"ch_readraw", 1, 2, FEARG_1, &t_string, f_ch_readraw}, - {"ch_sendexpr", 2, 3, FEARG_1, &t_void, f_ch_sendexpr}, - {"ch_sendraw", 2, 3, FEARG_1, &t_void, f_ch_sendraw}, - {"ch_setoptions", 2, 2, FEARG_1, &t_void, f_ch_setoptions}, - {"ch_status", 1, 2, FEARG_1, &t_string, f_ch_status}, -#endif - {"changenr", 0, 0, 0, &t_number, f_changenr}, - {"char2nr", 1, 2, FEARG_1, &t_number, f_char2nr}, - {"chdir", 1, 1, FEARG_1, &t_string, f_chdir}, - {"cindent", 1, 1, FEARG_1, &t_number, f_cindent}, - {"clearmatches", 0, 1, FEARG_1, &t_void, f_clearmatches}, - {"col", 1, 1, FEARG_1, &t_number, f_col}, - {"complete", 2, 2, FEARG_2, &t_void, f_complete}, - {"complete_add", 1, 1, FEARG_1, &t_number, f_complete_add}, - {"complete_check", 0, 0, 0, &t_number, f_complete_check}, - {"complete_info", 0, 1, FEARG_1, &t_dict_any, f_complete_info}, - {"confirm", 1, 4, FEARG_1, &t_number, f_confirm}, - {"copy", 1, 1, FEARG_1, &t_any, f_copy}, + {"ch_canread", 1, 1, FEARG_1, ret_number, f_ch_canread}, + {"ch_close", 1, 1, FEARG_1, ret_void, f_ch_close}, + {"ch_close_in", 1, 1, FEARG_1, ret_void, f_ch_close_in}, + {"ch_evalexpr", 2, 3, FEARG_1, ret_any, f_ch_evalexpr}, + {"ch_evalraw", 2, 3, FEARG_1, ret_any, f_ch_evalraw}, + {"ch_getbufnr", 2, 2, FEARG_1, ret_number, f_ch_getbufnr}, + {"ch_getjob", 1, 1, FEARG_1, ret_job, f_ch_getjob}, + {"ch_info", 1, 1, FEARG_1, ret_dict_any, f_ch_info}, + {"ch_log", 1, 2, FEARG_1, ret_void, f_ch_log}, + {"ch_logfile", 1, 2, FEARG_1, ret_void, f_ch_logfile}, + {"ch_open", 1, 2, FEARG_1, ret_channel, f_ch_open}, + {"ch_read", 1, 2, FEARG_1, ret_string, f_ch_read}, + {"ch_readblob", 1, 2, FEARG_1, ret_blob, f_ch_readblob}, + {"ch_readraw", 1, 2, FEARG_1, ret_string, f_ch_readraw}, + {"ch_sendexpr", 2, 3, FEARG_1, ret_void, f_ch_sendexpr}, + {"ch_sendraw", 2, 3, FEARG_1, ret_void, f_ch_sendraw}, + {"ch_setoptions", 2, 2, FEARG_1, ret_void, f_ch_setoptions}, + {"ch_status", 1, 2, FEARG_1, ret_string, f_ch_status}, +#endif + {"changenr", 0, 0, 0, ret_number, f_changenr}, + {"char2nr", 1, 2, FEARG_1, ret_number, f_char2nr}, + {"chdir", 1, 1, FEARG_1, ret_string, f_chdir}, + {"cindent", 1, 1, FEARG_1, ret_number, f_cindent}, + {"clearmatches", 0, 1, FEARG_1, ret_void, f_clearmatches}, + {"col", 1, 1, FEARG_1, ret_number, f_col}, + {"complete", 2, 2, FEARG_2, ret_void, f_complete}, + {"complete_add", 1, 1, FEARG_1, ret_number, f_complete_add}, + {"complete_check", 0, 0, 0, ret_number, f_complete_check}, + {"complete_info", 0, 1, FEARG_1, ret_dict_any, f_complete_info}, + {"confirm", 1, 4, FEARG_1, ret_number, f_confirm}, + {"copy", 1, 1, FEARG_1, ret_any, f_copy}, #ifdef FEAT_FLOAT - {"cos", 1, 1, FEARG_1, &t_float, f_cos}, - {"cosh", 1, 1, FEARG_1, &t_float, f_cosh}, + {"cos", 1, 1, FEARG_1, ret_float, f_cos}, + {"cosh", 1, 1, FEARG_1, ret_float, f_cosh}, #endif - {"count", 2, 4, FEARG_1, &t_number, f_count}, - {"cscope_connection",0,3, 0, &t_number, f_cscope_connection}, - {"cursor", 1, 3, FEARG_1, &t_number, f_cursor}, + {"count", 2, 4, FEARG_1, ret_number, f_count}, + {"cscope_connection",0,3, 0, ret_number, f_cscope_connection}, + {"cursor", 1, 3, FEARG_1, ret_number, f_cursor}, #ifdef MSWIN - {"debugbreak", 1, 1, FEARG_1, &t_number, f_debugbreak}, -#endif - {"deepcopy", 1, 2, FEARG_1, &t_any, f_deepcopy}, - {"delete", 1, 2, FEARG_1, &t_number, f_delete}, - {"deletebufline", 2, 3, FEARG_1, &t_number, f_deletebufline}, - {"did_filetype", 0, 0, 0, &t_number, f_did_filetype}, - {"diff_filler", 1, 1, FEARG_1, &t_number, f_diff_filler}, - {"diff_hlID", 2, 2, FEARG_1, &t_number, f_diff_hlID}, - {"echoraw", 1, 1, FEARG_1, &t_number, f_echoraw}, - {"empty", 1, 1, FEARG_1, &t_number, f_empty}, - {"environ", 0, 0, 0, &t_dict_string, f_environ}, - {"escape", 2, 2, FEARG_1, &t_string, f_escape}, - {"eval", 1, 1, FEARG_1, &t_any, f_eval}, - {"eventhandler", 0, 0, 0, &t_number, f_eventhandler}, - {"executable", 1, 1, FEARG_1, &t_number, f_executable}, - {"execute", 1, 2, FEARG_1, &t_string, f_execute}, - {"exepath", 1, 1, FEARG_1, &t_string, f_exepath}, - {"exists", 1, 1, FEARG_1, &t_number, f_exists}, + {"debugbreak", 1, 1, FEARG_1, ret_number, f_debugbreak}, +#endif + {"deepcopy", 1, 2, FEARG_1, ret_any, f_deepcopy}, + {"delete", 1, 2, FEARG_1, ret_number, f_delete}, + {"deletebufline", 2, 3, FEARG_1, ret_number, f_deletebufline}, + {"did_filetype", 0, 0, 0, ret_number, f_did_filetype}, + {"diff_filler", 1, 1, FEARG_1, ret_number, f_diff_filler}, + {"diff_hlID", 2, 2, FEARG_1, ret_number, f_diff_hlID}, + {"echoraw", 1, 1, FEARG_1, ret_number, f_echoraw}, + {"empty", 1, 1, FEARG_1, ret_number, f_empty}, + {"environ", 0, 0, 0, ret_dict_string, f_environ}, + {"escape", 2, 2, FEARG_1, ret_string, f_escape}, + {"eval", 1, 1, FEARG_1, ret_any, f_eval}, + {"eventhandler", 0, 0, 0, ret_number, f_eventhandler}, + {"executable", 1, 1, FEARG_1, ret_number, f_executable}, + {"execute", 1, 2, FEARG_1, ret_string, f_execute}, + {"exepath", 1, 1, FEARG_1, ret_string, f_exepath}, + {"exists", 1, 1, FEARG_1, ret_number, f_exists}, #ifdef FEAT_FLOAT - {"exp", 1, 1, FEARG_1, &t_float, f_exp}, -#endif - {"expand", 1, 3, FEARG_1, &t_any, f_expand}, - {"expandcmd", 1, 1, FEARG_1, &t_string, f_expandcmd}, - {"extend", 2, 3, FEARG_1, &t_any, f_extend}, - {"feedkeys", 1, 2, FEARG_1, &t_void, f_feedkeys}, - {"file_readable", 1, 1, FEARG_1, &t_number, f_filereadable}, // obsolete - {"filereadable", 1, 1, FEARG_1, &t_number, f_filereadable}, - {"filewritable", 1, 1, FEARG_1, &t_number, f_filewritable}, - {"filter", 2, 2, FEARG_1, &t_any, f_filter}, - {"finddir", 1, 3, FEARG_1, &t_string, f_finddir}, - {"findfile", 1, 3, FEARG_1, &t_string, f_findfile}, + {"exp", 1, 1, FEARG_1, ret_float, f_exp}, +#endif + {"expand", 1, 3, FEARG_1, ret_any, f_expand}, + {"expandcmd", 1, 1, FEARG_1, ret_string, f_expandcmd}, + {"extend", 2, 3, FEARG_1, ret_any, f_extend}, + {"feedkeys", 1, 2, FEARG_1, ret_void, f_feedkeys}, + {"file_readable", 1, 1, FEARG_1, ret_number, f_filereadable}, // obsolete + {"filereadable", 1, 1, FEARG_1, ret_number, f_filereadable}, + {"filewritable", 1, 1, FEARG_1, ret_number, f_filewritable}, + {"filter", 2, 2, FEARG_1, ret_any, f_filter}, + {"finddir", 1, 3, FEARG_1, ret_string, f_finddir}, + {"findfile", 1, 3, FEARG_1, ret_string, f_findfile}, #ifdef FEAT_FLOAT - {"float2nr", 1, 1, FEARG_1, &t_number, f_float2nr}, - {"floor", 1, 1, FEARG_1, &t_float, f_floor}, - {"fmod", 2, 2, FEARG_1, &t_float, f_fmod}, -#endif - {"fnameescape", 1, 1, FEARG_1, &t_string, f_fnameescape}, - {"fnamemodify", 2, 2, FEARG_1, &t_string, f_fnamemodify}, - {"foldclosed", 1, 1, FEARG_1, &t_number, f_foldclosed}, - {"foldclosedend", 1, 1, FEARG_1, &t_number, f_foldclosedend}, - {"foldlevel", 1, 1, FEARG_1, &t_number, f_foldlevel}, - {"foldtext", 0, 0, 0, &t_string, f_foldtext}, - {"foldtextresult", 1, 1, FEARG_1, &t_string, f_foldtextresult}, - {"foreground", 0, 0, 0, &t_void, f_foreground}, - {"funcref", 1, 3, FEARG_1, &t_any, f_funcref}, - {"function", 1, 3, FEARG_1, &t_any, f_function}, - {"garbagecollect", 0, 1, 0, &t_void, f_garbagecollect}, - {"get", 2, 3, FEARG_1, &t_any, f_get}, - {"getbufinfo", 0, 1, 0, &t_list_dict_any, f_getbufinfo}, - {"getbufline", 2, 3, FEARG_1, &t_list_string, f_getbufline}, - {"getbufvar", 2, 3, FEARG_1, &t_any, f_getbufvar}, - {"getchangelist", 0, 1, FEARG_1, &t_list_any, f_getchangelist}, - {"getchar", 0, 1, 0, &t_number, f_getchar}, - {"getcharmod", 0, 0, 0, &t_number, f_getcharmod}, - {"getcharsearch", 0, 0, 0, &t_dict_any, f_getcharsearch}, - {"getcmdline", 0, 0, 0, &t_string, f_getcmdline}, - {"getcmdpos", 0, 0, 0, &t_number, f_getcmdpos}, - {"getcmdtype", 0, 0, 0, &t_string, f_getcmdtype}, - {"getcmdwintype", 0, 0, 0, &t_string, f_getcmdwintype}, - {"getcompletion", 2, 3, FEARG_1, &t_list_string, f_getcompletion}, - {"getcurpos", 0, 0, 0, &t_list_number, f_getcurpos}, - {"getcwd", 0, 2, FEARG_1, &t_string, f_getcwd}, - {"getenv", 1, 1, FEARG_1, &t_string, f_getenv}, - {"getfontname", 0, 1, 0, &t_string, f_getfontname}, - {"getfperm", 1, 1, FEARG_1, &t_string, f_getfperm}, - {"getfsize", 1, 1, FEARG_1, &t_number, f_getfsize}, - {"getftime", 1, 1, FEARG_1, &t_number, f_getftime}, - {"getftype", 1, 1, FEARG_1, &t_string, f_getftype}, - {"getimstatus", 0, 0, 0, &t_number, f_getimstatus}, - {"getjumplist", 0, 2, FEARG_1, &t_list_any, f_getjumplist}, - {"getline", 1, 2, FEARG_1, &t_string, f_getline}, - {"getloclist", 1, 2, 0, &t_list_dict_any, f_getloclist}, - {"getmatches", 0, 1, 0, &t_list_dict_any, f_getmatches}, - {"getmousepos", 0, 0, 0, &t_dict_number, f_getmousepos}, - {"getpid", 0, 0, 0, &t_number, f_getpid}, - {"getpos", 1, 1, FEARG_1, &t_list_number, f_getpos}, - {"getqflist", 0, 1, 0, &t_list_dict_any, f_getqflist}, - {"getreg", 0, 3, FEARG_1, &t_string, f_getreg}, - {"getregtype", 0, 1, FEARG_1, &t_string, f_getregtype}, - {"gettabinfo", 0, 1, FEARG_1, &t_list_dict_any, f_gettabinfo}, - {"gettabvar", 2, 3, FEARG_1, &t_any, f_gettabvar}, - {"gettabwinvar", 3, 4, FEARG_1, &t_any, f_gettabwinvar}, - {"gettagstack", 0, 1, FEARG_1, &t_dict_any, f_gettagstack}, - {"getwininfo", 0, 1, FEARG_1, &t_list_dict_any, f_getwininfo}, - {"getwinpos", 0, 1, FEARG_1, &t_list_number, f_getwinpos}, - {"getwinposx", 0, 0, 0, &t_number, f_getwinposx}, - {"getwinposy", 0, 0, 0, &t_number, f_getwinposy}, - {"getwinvar", 2, 3, FEARG_1, &t_any, f_getwinvar}, - {"glob", 1, 4, FEARG_1, &t_any, f_glob}, - {"glob2regpat", 1, 1, FEARG_1, &t_string, f_glob2regpat}, - {"globpath", 2, 5, FEARG_2, &t_any, f_globpath}, - {"has", 1, 1, 0, &t_number, f_has}, - {"has_key", 2, 2, FEARG_1, &t_number, f_has_key}, - {"haslocaldir", 0, 2, FEARG_1, &t_number, f_haslocaldir}, - {"hasmapto", 1, 3, FEARG_1, &t_number, f_hasmapto}, - {"highlightID", 1, 1, FEARG_1, &t_number, f_hlID}, // obsolete - {"highlight_exists",1, 1, FEARG_1, &t_number, f_hlexists}, // obsolete - {"histadd", 2, 2, FEARG_2, &t_number, f_histadd}, - {"histdel", 1, 2, FEARG_1, &t_number, f_histdel}, - {"histget", 1, 2, FEARG_1, &t_string, f_histget}, - {"histnr", 1, 1, FEARG_1, &t_number, f_histnr}, - {"hlID", 1, 1, FEARG_1, &t_number, f_hlID}, - {"hlexists", 1, 1, FEARG_1, &t_number, f_hlexists}, - {"hostname", 0, 0, 0, &t_string, f_hostname}, - {"iconv", 3, 3, FEARG_1, &t_string, f_iconv}, - {"indent", 1, 1, FEARG_1, &t_number, f_indent}, - {"index", 2, 4, FEARG_1, &t_number, f_index}, - {"input", 1, 3, FEARG_1, &t_string, f_input}, - {"inputdialog", 1, 3, FEARG_1, &t_string, f_inputdialog}, - {"inputlist", 1, 1, FEARG_1, &t_number, f_inputlist}, - {"inputrestore", 0, 0, 0, &t_number, f_inputrestore}, - {"inputsave", 0, 0, 0, &t_number, f_inputsave}, - {"inputsecret", 1, 2, FEARG_1, &t_string, f_inputsecret}, - {"insert", 2, 3, FEARG_1, &t_any, f_insert}, - {"interrupt", 0, 0, 0, &t_void, f_interrupt}, - {"invert", 1, 1, FEARG_1, &t_number, f_invert}, - {"isdirectory", 1, 1, FEARG_1, &t_number, f_isdirectory}, + {"float2nr", 1, 1, FEARG_1, ret_number, f_float2nr}, + {"floor", 1, 1, FEARG_1, ret_float, f_floor}, + {"fmod", 2, 2, FEARG_1, ret_float, f_fmod}, +#endif + {"fnameescape", 1, 1, FEARG_1, ret_string, f_fnameescape}, + {"fnamemodify", 2, 2, FEARG_1, ret_string, f_fnamemodify}, + {"foldclosed", 1, 1, FEARG_1, ret_number, f_foldclosed}, + {"foldclosedend", 1, 1, FEARG_1, ret_number, f_foldclosedend}, + {"foldlevel", 1, 1, FEARG_1, ret_number, f_foldlevel}, + {"foldtext", 0, 0, 0, ret_string, f_foldtext}, + {"foldtextresult", 1, 1, FEARG_1, ret_string, f_foldtextresult}, + {"foreground", 0, 0, 0, ret_void, f_foreground}, + {"funcref", 1, 3, FEARG_1, ret_partial_void, f_funcref}, + {"function", 1, 3, FEARG_1, ret_f_function, f_function}, + {"garbagecollect", 0, 1, 0, ret_void, f_garbagecollect}, + {"get", 2, 3, FEARG_1, ret_any, f_get}, + {"getbufinfo", 0, 1, 0, ret_list_dict_any, f_getbufinfo}, + {"getbufline", 2, 3, FEARG_1, ret_list_string, f_getbufline}, + {"getbufvar", 2, 3, FEARG_1, ret_any, f_getbufvar}, + {"getchangelist", 0, 1, FEARG_1, ret_list_any, f_getchangelist}, + {"getchar", 0, 1, 0, ret_number, f_getchar}, + {"getcharmod", 0, 0, 0, ret_number, f_getcharmod}, + {"getcharsearch", 0, 0, 0, ret_dict_any, f_getcharsearch}, + {"getcmdline", 0, 0, 0, ret_string, f_getcmdline}, + {"getcmdpos", 0, 0, 0, ret_number, f_getcmdpos}, + {"getcmdtype", 0, 0, 0, ret_string, f_getcmdtype}, + {"getcmdwintype", 0, 0, 0, ret_string, f_getcmdwintype}, + {"getcompletion", 2, 3, FEARG_1, ret_list_string, f_getcompletion}, + {"getcurpos", 0, 0, 0, ret_list_number, f_getcurpos}, + {"getcwd", 0, 2, FEARG_1, ret_string, f_getcwd}, + {"getenv", 1, 1, FEARG_1, ret_string, f_getenv}, + {"getfontname", 0, 1, 0, ret_string, f_getfontname}, + {"getfperm", 1, 1, FEARG_1, ret_string, f_getfperm}, + {"getfsize", 1, 1, FEARG_1, ret_number, f_getfsize}, + {"getftime", 1, 1, FEARG_1, ret_number, f_getftime}, + {"getftype", 1, 1, FEARG_1, ret_string, f_getftype}, + {"getimstatus", 0, 0, 0, ret_number, f_getimstatus}, + {"getjumplist", 0, 2, FEARG_1, ret_list_any, f_getjumplist}, + {"getline", 1, 2, FEARG_1, ret_f_getline, f_getline}, + {"getloclist", 1, 2, 0, ret_list_dict_any, f_getloclist}, + {"getmatches", 0, 1, 0, ret_list_dict_any, f_getmatches}, + {"getmousepos", 0, 0, 0, ret_dict_number, f_getmousepos}, + {"getpid", 0, 0, 0, ret_number, f_getpid}, + {"getpos", 1, 1, FEARG_1, ret_list_number, f_getpos}, + {"getqflist", 0, 1, 0, ret_list_dict_any, f_getqflist}, + {"getreg", 0, 3, FEARG_1, ret_string, f_getreg}, + {"getregtype", 0, 1, FEARG_1, ret_string, f_getregtype}, + {"gettabinfo", 0, 1, FEARG_1, ret_list_dict_any, f_gettabinfo}, + {"gettabvar", 2, 3, FEARG_1, ret_any, f_gettabvar}, + {"gettabwinvar", 3, 4, FEARG_1, ret_any, f_gettabwinvar}, + {"gettagstack", 0, 1, FEARG_1, ret_dict_any, f_gettagstack}, + {"getwininfo", 0, 1, FEARG_1, ret_list_dict_any, f_getwininfo}, + {"getwinpos", 0, 1, FEARG_1, ret_list_number, f_getwinpos}, + {"getwinposx", 0, 0, 0, ret_number, f_getwinposx}, + {"getwinposy", 0, 0, 0, ret_number, f_getwinposy}, + {"getwinvar", 2, 3, FEARG_1, ret_any, f_getwinvar}, + {"glob", 1, 4, FEARG_1, ret_any, f_glob}, + {"glob2regpat", 1, 1, FEARG_1, ret_string, f_glob2regpat}, + {"globpath", 2, 5, FEARG_2, ret_any, f_globpath}, + {"has", 1, 1, 0, ret_number, f_has}, + {"has_key", 2, 2, FEARG_1, ret_number, f_has_key}, + {"haslocaldir", 0, 2, FEARG_1, ret_number, f_haslocaldir}, + {"hasmapto", 1, 3, FEARG_1, ret_number, f_hasmapto}, + {"highlightID", 1, 1, FEARG_1, ret_number, f_hlID}, // obsolete + {"highlight_exists",1, 1, FEARG_1, ret_number, f_hlexists}, // obsolete + {"histadd", 2, 2, FEARG_2, ret_number, f_histadd}, + {"histdel", 1, 2, FEARG_1, ret_number, f_histdel}, + {"histget", 1, 2, FEARG_1, ret_string, f_histget}, + {"histnr", 1, 1, FEARG_1, ret_number, f_histnr}, + {"hlID", 1, 1, FEARG_1, ret_number, f_hlID}, + {"hlexists", 1, 1, FEARG_1, ret_number, f_hlexists}, + {"hostname", 0, 0, 0, ret_string, f_hostname}, + {"iconv", 3, 3, FEARG_1, ret_string, f_iconv}, + {"indent", 1, 1, FEARG_1, ret_number, f_indent}, + {"index", 2, 4, FEARG_1, ret_number, f_index}, + {"input", 1, 3, FEARG_1, ret_string, f_input}, + {"inputdialog", 1, 3, FEARG_1, ret_string, f_inputdialog}, + {"inputlist", 1, 1, FEARG_1, ret_number, f_inputlist}, + {"inputrestore", 0, 0, 0, ret_number, f_inputrestore}, + {"inputsave", 0, 0, 0, ret_number, f_inputsave}, + {"inputsecret", 1, 2, FEARG_1, ret_string, f_inputsecret}, + {"insert", 2, 3, FEARG_1, ret_any, f_insert}, + {"interrupt", 0, 0, 0, ret_void, f_interrupt}, + {"invert", 1, 1, FEARG_1, ret_number, f_invert}, + {"isdirectory", 1, 1, FEARG_1, ret_number, f_isdirectory}, #if defined(FEAT_FLOAT) && defined(HAVE_MATH_H) - {"isinf", 1, 1, FEARG_1, &t_number, f_isinf}, + {"isinf", 1, 1, FEARG_1, ret_number, f_isinf}, #endif - {"islocked", 1, 1, FEARG_1, &t_number, f_islocked}, + {"islocked", 1, 1, FEARG_1, ret_number, f_islocked}, #if defined(FEAT_FLOAT) && defined(HAVE_MATH_H) - {"isnan", 1, 1, FEARG_1, &t_number, f_isnan}, + {"isnan", 1, 1, FEARG_1, ret_number, f_isnan}, #endif - {"items", 1, 1, FEARG_1, &t_list_any, f_items}, + {"items", 1, 1, FEARG_1, ret_list_any, f_items}, #ifdef FEAT_JOB_CHANNEL - {"job_getchannel", 1, 1, FEARG_1, &t_channel, f_job_getchannel}, - {"job_info", 0, 1, FEARG_1, &t_dict_any, f_job_info}, - {"job_setoptions", 2, 2, FEARG_1, &t_void, f_job_setoptions}, - {"job_start", 1, 2, FEARG_1, &t_job, f_job_start}, - {"job_status", 1, 1, FEARG_1, &t_string, f_job_status}, - {"job_stop", 1, 2, FEARG_1, &t_number, f_job_stop}, -#endif - {"join", 1, 2, FEARG_1, &t_string, f_join}, - {"js_decode", 1, 1, FEARG_1, &t_any, f_js_decode}, - {"js_encode", 1, 1, FEARG_1, &t_string, f_js_encode}, - {"json_decode", 1, 1, FEARG_1, &t_any, f_json_decode}, - {"json_encode", 1, 1, FEARG_1, &t_string, f_json_encode}, - {"keys", 1, 1, FEARG_1, &t_list_any, f_keys}, - {"last_buffer_nr", 0, 0, 0, &t_number, f_last_buffer_nr}, // obsolete - {"len", 1, 1, FEARG_1, &t_number, f_len}, - {"libcall", 3, 3, FEARG_3, &t_string, f_libcall}, - {"libcallnr", 3, 3, FEARG_3, &t_number, f_libcallnr}, - {"line", 1, 2, FEARG_1, &t_number, f_line}, - {"line2byte", 1, 1, FEARG_1, &t_number, f_line2byte}, - {"lispindent", 1, 1, FEARG_1, &t_number, f_lispindent}, - {"list2str", 1, 2, FEARG_1, &t_string, f_list2str}, - {"listener_add", 1, 2, FEARG_2, &t_number, f_listener_add}, - {"listener_flush", 0, 1, FEARG_1, &t_void, f_listener_flush}, - {"listener_remove", 1, 1, FEARG_1, &t_number, f_listener_remove}, - {"localtime", 0, 0, 0, &t_number, f_localtime}, + {"job_getchannel", 1, 1, FEARG_1, ret_channel, f_job_getchannel}, + {"job_info", 0, 1, FEARG_1, ret_dict_any, f_job_info}, + {"job_setoptions", 2, 2, FEARG_1, ret_void, f_job_setoptions}, + {"job_start", 1, 2, FEARG_1, ret_job, f_job_start}, + {"job_status", 1, 1, FEARG_1, ret_string, f_job_status}, + {"job_stop", 1, 2, FEARG_1, ret_number, f_job_stop}, +#endif + {"join", 1, 2, FEARG_1, ret_string, f_join}, + {"js_decode", 1, 1, FEARG_1, ret_any, f_js_decode}, + {"js_encode", 1, 1, FEARG_1, ret_string, f_js_encode}, + {"json_decode", 1, 1, FEARG_1, ret_any, f_json_decode}, + {"json_encode", 1, 1, FEARG_1, ret_string, f_json_encode}, + {"keys", 1, 1, FEARG_1, ret_list_any, f_keys}, + {"last_buffer_nr", 0, 0, 0, ret_number, f_last_buffer_nr}, // obsolete + {"len", 1, 1, FEARG_1, ret_number, f_len}, + {"libcall", 3, 3, FEARG_3, ret_string, f_libcall}, + {"libcallnr", 3, 3, FEARG_3, ret_number, f_libcallnr}, + {"line", 1, 2, FEARG_1, ret_number, f_line}, + {"line2byte", 1, 1, FEARG_1, ret_number, f_line2byte}, + {"lispindent", 1, 1, FEARG_1, ret_number, f_lispindent}, + {"list2str", 1, 2, FEARG_1, ret_string, f_list2str}, + {"listener_add", 1, 2, FEARG_2, ret_number, f_listener_add}, + {"listener_flush", 0, 1, FEARG_1, ret_void, f_listener_flush}, + {"listener_remove", 1, 1, FEARG_1, ret_number, f_listener_remove}, + {"localtime", 0, 0, 0, ret_number, f_localtime}, #ifdef FEAT_FLOAT - {"log", 1, 1, FEARG_1, &t_float, f_log}, - {"log10", 1, 1, FEARG_1, &t_float, f_log10}, + {"log", 1, 1, FEARG_1, ret_float, f_log}, + {"log10", 1, 1, FEARG_1, ret_float, f_log10}, #endif #ifdef FEAT_LUA - {"luaeval", 1, 2, FEARG_1, &t_any, f_luaeval}, -#endif - {"map", 2, 2, FEARG_1, &t_any, f_map}, - {"maparg", 1, 4, FEARG_1, &t_string, f_maparg}, - {"mapcheck", 1, 3, FEARG_1, &t_string, f_mapcheck}, - {"match", 2, 4, FEARG_1, &t_any, f_match}, - {"matchadd", 2, 5, FEARG_1, &t_number, f_matchadd}, - {"matchaddpos", 2, 5, FEARG_1, &t_number, f_matchaddpos}, - {"matcharg", 1, 1, FEARG_1, &t_list_string, f_matcharg}, - {"matchdelete", 1, 2, FEARG_1, &t_number, f_matchdelete}, - {"matchend", 2, 4, FEARG_1, &t_number, f_matchend}, - {"matchlist", 2, 4, FEARG_1, &t_list_string, f_matchlist}, - {"matchstr", 2, 4, FEARG_1, &t_string, f_matchstr}, - {"matchstrpos", 2, 4, FEARG_1, &t_list_any, f_matchstrpos}, - {"max", 1, 1, FEARG_1, &t_any, f_max}, - {"min", 1, 1, FEARG_1, &t_any, f_min}, - {"mkdir", 1, 3, FEARG_1, &t_number, f_mkdir}, - {"mode", 0, 1, FEARG_1, &t_string, f_mode}, + {"luaeval", 1, 2, FEARG_1, ret_any, f_luaeval}, +#endif + {"map", 2, 2, FEARG_1, ret_any, f_map}, + {"maparg", 1, 4, FEARG_1, ret_string, f_maparg}, + {"mapcheck", 1, 3, FEARG_1, ret_string, f_mapcheck}, + {"match", 2, 4, FEARG_1, ret_any, f_match}, + {"matchadd", 2, 5, FEARG_1, ret_number, f_matchadd}, + {"matchaddpos", 2, 5, FEARG_1, ret_number, f_matchaddpos}, + {"matcharg", 1, 1, FEARG_1, ret_list_string, f_matcharg}, + {"matchdelete", 1, 2, FEARG_1, ret_number, f_matchdelete}, + {"matchend", 2, 4, FEARG_1, ret_number, f_matchend}, + {"matchlist", 2, 4, FEARG_1, ret_list_string, f_matchlist}, + {"matchstr", 2, 4, FEARG_1, ret_string, f_matchstr}, + {"matchstrpos", 2, 4, FEARG_1, ret_list_any, f_matchstrpos}, + {"max", 1, 1, FEARG_1, ret_any, f_max}, + {"min", 1, 1, FEARG_1, ret_any, f_min}, + {"mkdir", 1, 3, FEARG_1, ret_number, f_mkdir}, + {"mode", 0, 1, FEARG_1, ret_string, f_mode}, #ifdef FEAT_MZSCHEME - {"mzeval", 1, 1, FEARG_1, &t_any, f_mzeval}, + {"mzeval", 1, 1, FEARG_1, ret_any, f_mzeval}, #endif - {"nextnonblank", 1, 1, FEARG_1, &t_number, f_nextnonblank}, - {"nr2char", 1, 2, FEARG_1, &t_string, f_nr2char}, - {"or", 2, 2, FEARG_1, &t_number, f_or}, - {"pathshorten", 1, 1, FEARG_1, &t_string, f_pathshorten}, + {"nextnonblank", 1, 1, FEARG_1, ret_number, f_nextnonblank}, + {"nr2char", 1, 2, FEARG_1, ret_string, f_nr2char}, + {"or", 2, 2, FEARG_1, ret_number, f_or}, + {"pathshorten", 1, 1, FEARG_1, ret_string, f_pathshorten}, #ifdef FEAT_PERL - {"perleval", 1, 1, FEARG_1, &t_any, f_perleval}, + {"perleval", 1, 1, FEARG_1, ret_any, f_perleval}, #endif #ifdef FEAT_PROP_POPUP - {"popup_atcursor", 2, 2, FEARG_1, &t_number, f_popup_atcursor}, - {"popup_beval", 2, 2, FEARG_1, &t_number, f_popup_beval}, - {"popup_clear", 0, 0, 0, &t_void, f_popup_clear}, - {"popup_close", 1, 2, FEARG_1, &t_void, f_popup_close}, - {"popup_create", 2, 2, FEARG_1, &t_number, f_popup_create}, - {"popup_dialog", 2, 2, FEARG_1, &t_number, f_popup_dialog}, - {"popup_filter_menu", 2, 2, 0, &t_number, f_popup_filter_menu}, - {"popup_filter_yesno", 2, 2, 0, &t_number, f_popup_filter_yesno}, - {"popup_findinfo", 0, 0, 0, &t_number, f_popup_findinfo}, - {"popup_findpreview", 0, 0, 0, &t_number, f_popup_findpreview}, - {"popup_getoptions", 1, 1, FEARG_1, &t_dict_any, f_popup_getoptions}, - {"popup_getpos", 1, 1, FEARG_1, &t_dict_any, f_popup_getpos}, - {"popup_hide", 1, 1, FEARG_1, &t_void, f_popup_hide}, - {"popup_locate", 2, 2, 0, &t_number, f_popup_locate}, - {"popup_menu", 2, 2, FEARG_1, &t_number, f_popup_menu}, - {"popup_move", 2, 2, FEARG_1, &t_void, f_popup_move}, - {"popup_notification", 2, 2, FEARG_1, &t_number, f_popup_notification}, - {"popup_setoptions", 2, 2, FEARG_1, &t_void, f_popup_setoptions}, - {"popup_settext", 2, 2, FEARG_1, &t_void, f_popup_settext}, - {"popup_show", 1, 1, FEARG_1, &t_void, f_popup_show}, + {"popup_atcursor", 2, 2, FEARG_1, ret_number, f_popup_atcursor}, + {"popup_beval", 2, 2, FEARG_1, ret_number, f_popup_beval}, + {"popup_clear", 0, 0, 0, ret_void, f_popup_clear}, + {"popup_close", 1, 2, FEARG_1, ret_void, f_popup_close}, + {"popup_create", 2, 2, FEARG_1, ret_number, f_popup_create}, + {"popup_dialog", 2, 2, FEARG_1, ret_number, f_popup_dialog}, + {"popup_filter_menu", 2, 2, 0, ret_number, f_popup_filter_menu}, + {"popup_filter_yesno", 2, 2, 0, ret_number, f_popup_filter_yesno}, + {"popup_findinfo", 0, 0, 0, ret_number, f_popup_findinfo}, + {"popup_findpreview", 0, 0, 0, ret_number, f_popup_findpreview}, + {"popup_getoptions", 1, 1, FEARG_1, ret_dict_any, f_popup_getoptions}, + {"popup_getpos", 1, 1, FEARG_1, ret_dict_any, f_popup_getpos}, + {"popup_hide", 1, 1, FEARG_1, ret_void, f_popup_hide}, + {"popup_locate", 2, 2, 0, ret_number, f_popup_locate}, + {"popup_menu", 2, 2, FEARG_1, ret_number, f_popup_menu}, + {"popup_move", 2, 2, FEARG_1, ret_void, f_popup_move}, + {"popup_notification", 2, 2, FEARG_1, ret_number, f_popup_notification}, + {"popup_setoptions", 2, 2, FEARG_1, ret_void, f_popup_setoptions}, + {"popup_settext", 2, 2, FEARG_1, ret_void, f_popup_settext}, + {"popup_show", 1, 1, FEARG_1, ret_void, f_popup_show}, #endif #ifdef FEAT_FLOAT - {"pow", 2, 2, FEARG_1, &t_float, f_pow}, + {"pow", 2, 2, FEARG_1, ret_float, f_pow}, #endif - {"prevnonblank", 1, 1, FEARG_1, &t_number, f_prevnonblank}, - {"printf", 1, 19, FEARG_2, &t_string, f_printf}, + {"prevnonblank", 1, 1, FEARG_1, ret_number, f_prevnonblank}, + {"printf", 1, 19, FEARG_2, ret_string, f_printf}, #ifdef FEAT_JOB_CHANNEL - {"prompt_setcallback", 2, 2, FEARG_1, &t_void, f_prompt_setcallback}, - {"prompt_setinterrupt", 2, 2, FEARG_1,&t_void, f_prompt_setinterrupt}, - {"prompt_setprompt", 2, 2, FEARG_1, &t_void, f_prompt_setprompt}, + {"prompt_setcallback", 2, 2, FEARG_1, ret_void, f_prompt_setcallback}, + {"prompt_setinterrupt", 2, 2, FEARG_1,ret_void, f_prompt_setinterrupt}, + {"prompt_setprompt", 2, 2, FEARG_1, ret_void, f_prompt_setprompt}, #endif #ifdef FEAT_PROP_POPUP - {"prop_add", 3, 3, FEARG_1, &t_void, f_prop_add}, - {"prop_clear", 1, 3, FEARG_1, &t_void, f_prop_clear}, - {"prop_find", 1, 2, FEARG_1, &t_dict_any, f_prop_find}, - {"prop_list", 1, 2, FEARG_1, &t_list_dict_any, f_prop_list}, - {"prop_remove", 1, 3, FEARG_1, &t_number, f_prop_remove}, - {"prop_type_add", 2, 2, FEARG_1, &t_void, f_prop_type_add}, - {"prop_type_change", 2, 2, FEARG_1, &t_void, f_prop_type_change}, - {"prop_type_delete", 1, 2, FEARG_1, &t_void, f_prop_type_delete}, - {"prop_type_get", 1, 2, FEARG_1, &t_dict_any, f_prop_type_get}, - {"prop_type_list", 0, 1, FEARG_1, &t_list_string, f_prop_type_list}, -#endif - {"pum_getpos", 0, 0, 0, &t_dict_number, f_pum_getpos}, - {"pumvisible", 0, 0, 0, &t_number, f_pumvisible}, + {"prop_add", 3, 3, FEARG_1, ret_void, f_prop_add}, + {"prop_clear", 1, 3, FEARG_1, ret_void, f_prop_clear}, + {"prop_find", 1, 2, FEARG_1, ret_dict_any, f_prop_find}, + {"prop_list", 1, 2, FEARG_1, ret_list_dict_any, f_prop_list}, + {"prop_remove", 1, 3, FEARG_1, ret_number, f_prop_remove}, + {"prop_type_add", 2, 2, FEARG_1, ret_void, f_prop_type_add}, + {"prop_type_change", 2, 2, FEARG_1, ret_void, f_prop_type_change}, + {"prop_type_delete", 1, 2, FEARG_1, ret_void, f_prop_type_delete}, + {"prop_type_get", 1, 2, FEARG_1, ret_dict_any, f_prop_type_get}, + {"prop_type_list", 0, 1, FEARG_1, ret_list_string, f_prop_type_list}, +#endif + {"pum_getpos", 0, 0, 0, ret_dict_number, f_pum_getpos}, + {"pumvisible", 0, 0, 0, ret_number, f_pumvis |