comparison src/vim9.h @ 21232:3f14e0d4a4dd v8.2.1167

patch 8.2.1167: Vim9: builtin function method call only supports first arg Commit: https://github.com/vim/vim/commit/389df259c49d1ca4f7aa129b702f6083985b1e73 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jul 9 21:20:47 2020 +0200 patch 8.2.1167: Vim9: builtin function method call only supports first arg Problem: Vim9: builtin function method call only supports first argument. Solution: Shift arguments when needed. (closes https://github.com/vim/vim/issues/6305, closes https://github.com/vim/vim/issues/6419)
author Bram Moolenaar <Bram@vim.org>
date Thu, 09 Jul 2020 21:30:03 +0200
parents 65d9189d4dca
children 320581a133d9
comparison
equal deleted inserted replaced
21231:fcc215b37837 21232:3f14e0d4a4dd
122 122
123 ISN_CHECKNR, // check value can be used as a number 123 ISN_CHECKNR, // check value can be used as a number
124 ISN_CHECKTYPE, // check value type is isn_arg.type.tc_type 124 ISN_CHECKTYPE, // check value type is isn_arg.type.tc_type
125 ISN_CHECKLEN, // check list length is isn_arg.checklen.cl_min_len 125 ISN_CHECKLEN, // check list length is isn_arg.checklen.cl_min_len
126 126
127 ISN_SHUFFLE, // move item on stack up or down
127 ISN_DROP // pop stack and discard value 128 ISN_DROP // pop stack and discard value
128 } isntype_T; 129 } isntype_T;
129 130
130 131
131 // arguments to ISN_BCALL 132 // arguments to ISN_BCALL
234 // arguments to ISN_CHECKLEN 235 // arguments to ISN_CHECKLEN
235 typedef struct { 236 typedef struct {
236 int cl_min_len; // minimum length 237 int cl_min_len; // minimum length
237 int cl_more_OK; // longer is allowed 238 int cl_more_OK; // longer is allowed
238 } checklen_T; 239 } checklen_T;
240
241 // arguments to ISN_SHUFFLE
242 typedef struct {
243 int shfl_item; // item to move (relative to top of stack)
244 int shfl_up; // places to move upwards
245 } shuffle_T;
239 246
240 /* 247 /*
241 * Instruction 248 * Instruction
242 */ 249 */
243 struct isn_S { 250 struct isn_S {
268 loadstore_T loadstore; 275 loadstore_T loadstore;
269 script_T script; 276 script_T script;
270 unlet_T unlet; 277 unlet_T unlet;
271 funcref_T funcref; 278 funcref_T funcref;
272 checklen_T checklen; 279 checklen_T checklen;
280 shuffle_T shuffle;
273 } isn_arg; 281 } isn_arg;
274 }; 282 };
275 283
276 /* 284 /*
277 * Info about a function defined with :def. Used in "def_functions". 285 * Info about a function defined with :def. Used in "def_functions".