mirror of
https://github.com/neovim/neovim.git
synced 2025-09-24 20:18:32 +00:00
*: Move some dictionary functions to typval.h and use char*
Also fixes buffer reusage in setmatches() and complete().
This commit is contained in:
@@ -744,11 +744,11 @@ bool encode_check_json_key(const typval_T *const tv)
|
||||
}
|
||||
const dictitem_T *type_di;
|
||||
const dictitem_T *val_di;
|
||||
if ((type_di = dict_find((dict_T *) spdict, (char_u *) "_TYPE", -1)) == NULL
|
||||
if ((type_di = tv_dict_find(spdict, S_LEN("_TYPE"))) == NULL
|
||||
|| type_di->di_tv.v_type != VAR_LIST
|
||||
|| (type_di->di_tv.vval.v_list != eval_msgpack_type_lists[kMPString]
|
||||
&& type_di->di_tv.vval.v_list != eval_msgpack_type_lists[kMPBinary])
|
||||
|| (val_di = dict_find((dict_T *) spdict, (char_u *) "_VAL", -1)) == NULL
|
||||
|| (val_di = tv_dict_find(spdict, S_LEN("_VAL"))) == NULL
|
||||
|| val_di->di_tv.v_type != VAR_LIST) {
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user