diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-01-13 20:38:03 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-01-13 20:38:03 +0100 |
commit | c423ad77ed763c11ba67729bbf63c1cf0915231f (patch) | |
tree | d50a83a06633e84412413b5b6c8fcbe58a4acf75 /src/evalfunc.c | |
parent | 9145846b6aa411e3ab5c0d145b37808654352877 (diff) | |
download | vim-git-c423ad77ed763c11ba67729bbf63c1cf0915231f.tar.gz |
patch 8.2.2343: Vim9: return type of readfile() is anyv8.2.2343
Problem: Vim9: return type of readfile() is any.
Solution: Add readblob() so that readfile() can be expected to always
return a list of strings. (closes #7671)
Diffstat (limited to 'src/evalfunc.c')
-rw-r--r-- | src/evalfunc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/evalfunc.c b/src/evalfunc.c index 59fa2b1cf..a891378ee 100644 --- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -1344,12 +1344,14 @@ static funcentry_T global_functions[] = ret_number, f_rand}, {"range", 1, 3, FEARG_1, NULL, ret_list_number, f_range}, + {"readblob", 1, 1, FEARG_1, NULL, + ret_blob, f_readblob}, {"readdir", 1, 3, FEARG_1, NULL, ret_list_string, f_readdir}, {"readdirex", 1, 3, FEARG_1, NULL, ret_list_dict_any, f_readdirex}, {"readfile", 1, 3, FEARG_1, NULL, - ret_any, f_readfile}, + ret_list_string, f_readfile}, {"reduce", 2, 3, FEARG_1, NULL, ret_any, f_reduce}, {"reg_executing", 0, 0, 0, NULL, |