0
0
mirror of https://github.com/vim/vim.git synced 2025-10-10 06:24:10 -04:00

patch 8.2.0111: VAR_SPECIAL is also used for booleans

Problem:    VAR_SPECIAL is also used for booleans.
Solution:   Add VAR_BOOL for better type checking.
This commit is contained in:
Bram Moolenaar
2020-01-11 16:05:23 +01:00
parent e05a89ac63
commit 9b4a15d5db
16 changed files with 87 additions and 54 deletions

View File

@@ -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