comparison src/channel.c @ 25198:eafc0e07b188 v8.2.3135

patch 8.2.3135: Vim9: builtin function arguments not checked at compile time Commit: https://github.com/vim/vim/commit/5b73992d8f82be7ac4b6f46c17f53ffb9640e5fa Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Sat Jul 10 13:15:41 2021 +0200 patch 8.2.3135: Vim9: builtin function arguments not checked at compile time Problem: Vim9: builtin function arguments not checked at compile time. Solution: Add more type checks. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/8539)
author Bram Moolenaar <Bram@vim.org>
date Sat, 10 Jul 2021 13:30:06 +0200
parents 73503bafb3bf
children 4d3c68196d05
comparison
equal deleted inserted replaced
25197:c8c0a86999f1 25198:eafc0e07b188
1309 int port; 1309 int port;
1310 int is_ipv6 = FALSE; 1310 int is_ipv6 = FALSE;
1311 jobopt_T opt; 1311 jobopt_T opt;
1312 channel_T *channel = NULL; 1312 channel_T *channel = NULL;
1313 1313
1314 if (in_vim9script()
1315 && (check_for_string_arg(argvars, 0) == FAIL
1316 || check_for_dict_arg(argvars, 1) == FAIL))
1317 return NULL;
1318
1314 address = tv_get_string(&argvars[0]); 1319 address = tv_get_string(&argvars[0]);
1315 if (argvars[1].v_type != VAR_UNKNOWN 1320 if (argvars[1].v_type != VAR_UNKNOWN
1316 && (argvars[1].v_type != VAR_DICT || argvars[1].vval.v_dict == NULL)) 1321 && (argvars[1].v_type != VAR_DICT || argvars[1].vval.v_dict == NULL))
1317 { 1322 {
1318 emsg(_(e_invarg)); 1323 emsg(_(e_invarg));