summaryrefslogtreecommitdiff
path: root/src/structs.h
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-09-09 22:27:58 +0200
committerBram Moolenaar <Bram@vim.org>2020-09-09 22:27:58 +0200
commitc1ec0422e43720d2e96627605532ee9806c0789f (patch)
tree567a177470c45e6b244f503ca4d89e88e7a977c3 /src/structs.h
parent3e4cc9671c5551b73f0176cab40e676ed72a1716 (diff)
downloadvim-git-c1ec0422e43720d2e96627605532ee9806c0789f.tar.gz
patch 8.2.1650: Vim9: result of && and || expression is not bool in scriptv8.2.1650
Problem: Vim9: result of && and || expression cannot be assigned to a bool at the script level. Solution: Add the VAR_BOOL_OK flag. Convert to bool when needed.
Diffstat (limited to 'src/structs.h')
-rw-r--r--src/structs.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/structs.h b/src/structs.h
index 0899ae792..7c3b81e04 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -1381,7 +1381,7 @@ struct type_S {
typedef struct
{
vartype_T v_type;
- char v_lock; // see below: VAR_LOCKED, VAR_FIXED
+ char v_lock; // see below: VAR_LOCKED, VAR_FIXED, VAR_BOOL_OK
union
{
varnumber_T v_number; // number value
@@ -1406,8 +1406,9 @@ typedef struct
// allowed to mask existing functions
// Values for "v_lock".
-#define VAR_LOCKED 1 // locked with lock(), can use unlock()
-#define VAR_FIXED 2 // locked forever
+#define VAR_LOCKED 1 // locked with lock(), can use unlock()
+#define VAR_FIXED 2 // locked forever
+#define VAR_BOOL_OK 4 // can be convered to bool
/*
* Structure to hold an item of a list: an internal variable without a name.