0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.2343: Vim9: return type of readfile() is any

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)
This commit is contained in:
Bram Moolenaar
2021-01-13 20:38:03 +01:00
parent 9145846b6a
commit c423ad77ed
7 changed files with 74 additions and 10 deletions

View File

@@ -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,