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

patch 9.0.0623: error for modifying a const is not detected at compile time

Problem:    Error for modifying a const is not detected at compile time.
Solution:   Add TTFLAG_CONST and check for it in add() and extend().
This commit is contained in:
Bram Moolenaar
2022-09-29 19:14:42 +01:00
parent 9f573a8df0
commit fa1039760e
12 changed files with 446 additions and 62 deletions

View File

@@ -1445,10 +1445,10 @@ typedef struct {
type_T *type_decl; // declared type or equal to type_current
} type2_T;
#define TTFLAG_VARARGS 1 // func args ends with "..."
#define TTFLAG_OPTARG 2 // func arg type with "?"
#define TTFLAG_BOOL_OK 4 // can be converted to bool
#define TTFLAG_STATIC 8 // one of the static types, e.g. t_any
#define TTFLAG_VARARGS 0x01 // func args ends with "..."
#define TTFLAG_BOOL_OK 0x02 // can be converted to bool
#define TTFLAG_STATIC 0x04 // one of the static types, e.g. t_any
#define TTFLAG_CONST 0x08 // cannot be changed
/*
* Structure to hold an internal variable without a name.