*: Move some dictionary functions to typval.h and use char*

Also fixes buffer reusage in setmatches() and complete().
This commit is contained in:
ZyX
2016-08-20 22:24:34 +03:00
parent 50a48f2a0e
commit e18a578308
52 changed files with 2215 additions and 1844 deletions

View File

@@ -317,7 +317,7 @@ static long get_undolevel(void)
static inline void zero_fmark_additional_data(fmark_T *fmarks)
{
for (size_t i = 0; i < NMARKS; i++) {
dict_unref(fmarks[i].additional_data);
tv_dict_unref(fmarks[i].additional_data);
fmarks[i].additional_data = NULL;
}
}
@@ -2941,7 +2941,7 @@ void u_eval_tree(u_header_T *first_uhp, list_T *list)
dict_T *dict;
while (uhp != NULL) {
dict = dict_alloc();
dict = tv_dict_alloc();
dict_add_nr_str(dict, "seq", uhp->uh_seq, NULL);
dict_add_nr_str(dict, "time", (long)uhp->uh_time, NULL);
if (uhp == curbuf->b_u_newhead)