diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-01-11 16:05:23 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-01-11 16:05:23 +0100 |
commit | 9b4a15d5dba354d2e1e02871470bad103f34769a (patch) | |
tree | e5e49ad3182e07e641cdea0e04c4a8078186c58c /src/if_mzsch.c | |
parent | e05a89ac6399a8c7d164c99fdab6841d999a9128 (diff) |
patch 8.2.0111: VAR_SPECIAL is also used for booleansv8.2.0111
Problem: VAR_SPECIAL is also used for booleans.
Solution: Add VAR_BOOL for better type checking.
Diffstat (limited to 'src/if_mzsch.c')
-rw-r--r-- | src/if_mzsch.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/if_mzsch.c b/src/if_mzsch.c index bf0157a59e..e31d0e110c 100644 --- a/src/if_mzsch.c +++ b/src/if_mzsch.c @@ -3136,7 +3136,7 @@ vim_to_mzscheme_impl(typval_T *vim_value, int depth, Scheme_Hash_Table *visited) MZ_GC_UNREG(); } } - else if (vim_value->v_type == VAR_SPECIAL) + else if (vim_value->v_type == VAR_BOOL || vim_value->v_type == VAR_SPECIAL) { if (vim_value->vval.v_number <= VVAL_TRUE) result = scheme_make_integer((long)vim_value->vval.v_number); @@ -3218,7 +3218,7 @@ mzscheme_to_vim_impl(Scheme_Object *obj, typval_T *tv, int depth, } else if (SCHEME_BOOLP(obj)) { - tv->v_type = VAR_SPECIAL; + tv->v_type = VAR_BOOL; tv->vval.v_number = SCHEME_TRUEP(obj); } # ifdef FEAT_FLOAT |