comparison src/structs.h @ 21558:1c4d4aa22b37 v8.2.1329

patch 8.2.1329: Vim9: cannot define global function inside :def function Commit: https://github.com/vim/vim/commit/38ddf333f6b2806b0ea2dd052ee1cd50dd7f4525 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Jul 31 22:05:04 2020 +0200 patch 8.2.1329: Vim9: cannot define global function inside :def function Problem: Vim9: cannot define global function inside :def function. Solution: Assign to global variable instead of local. (closes https://github.com/vim/vim/issues/6584)
author Bram Moolenaar <Bram@vim.org>
date Fri, 31 Jul 2020 22:15:04 +0200
parents 47f25a0c5a42
children a640bc762196
comparison
equal deleted inserted replaced
21557:00c9f8522652 21558:1c4d4aa22b37
1544 UF_COMPILED 1544 UF_COMPILED
1545 } def_status_T; 1545 } def_status_T;
1546 1546
1547 /* 1547 /*
1548 * Structure to hold info for a user function. 1548 * Structure to hold info for a user function.
1549 * When adding a field check copy_func().
1549 */ 1550 */
1550 typedef struct 1551 typedef struct
1551 { 1552 {
1552 int uf_varargs; // variable nr of arguments (old style) 1553 int uf_varargs; // variable nr of arguments (old style)
1553 int uf_flags; // FC_ flags 1554 int uf_flags; // FC_ flags
1616 #define FC_DEAD 0x80 // function kept only for reference to dfunc 1617 #define FC_DEAD 0x80 // function kept only for reference to dfunc
1617 #define FC_EXPORT 0x100 // "export def Func()" 1618 #define FC_EXPORT 0x100 // "export def Func()"
1618 #define FC_NOARGS 0x200 // no a: variables in lambda 1619 #define FC_NOARGS 0x200 // no a: variables in lambda
1619 #define FC_VIM9 0x400 // defined in vim9 script file 1620 #define FC_VIM9 0x400 // defined in vim9 script file
1620 #define FC_CFUNC 0x800 // defined as Lua C func 1621 #define FC_CFUNC 0x800 // defined as Lua C func
1622 #define FC_COPY 0x1000 // copy of another function by copy_func()
1621 1623
1622 #define MAX_FUNC_ARGS 20 // maximum number of function arguments 1624 #define MAX_FUNC_ARGS 20 // maximum number of function arguments
1623 #define VAR_SHORT_LEN 20 // short variable name length 1625 #define VAR_SHORT_LEN 20 // short variable name length
1624 #define FIXVAR_CNT 12 // number of fixed variables 1626 #define FIXVAR_CNT 12 // number of fixed variables
1625 1627