diff src/undo.c @ 14301:3c80092eb211 v8.1.0166

patch 8.1.0166: using dict_add_nr_str() is clumsy commit https://github.com/vim/vim/commit/e0be167a805fd547c25ec1ec97fd4c7f13046236 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jul 8 16:50:37 2018 +0200 patch 8.1.0166: using dict_add_nr_str() is clumsy Problem: Using dict_add_nr_str() is clumsy. Solution: Split into two functions. (Ozaki Kiichi, closes https://github.com/vim/vim/issues/3154)
author Christian Brabandt <cb@256bit.org>
date Sun, 08 Jul 2018 17:00:07 +0200
parents 487d7bda80ea
children b8f1167aa8ad
line wrap: on
line diff
--- a/src/undo.c
+++ b/src/undo.c
@@ -3567,14 +3567,14 @@ u_eval_tree(u_header_T *first_uhp, list_
 	dict = dict_alloc();
 	if (dict == NULL)
 	    return;
-	dict_add_nr_str(dict, "seq", uhp->uh_seq, NULL);
-	dict_add_nr_str(dict, "time", (long)uhp->uh_time, NULL);
+	dict_add_number(dict, "seq", uhp->uh_seq);
+	dict_add_number(dict, "time", (long)uhp->uh_time);
 	if (uhp == curbuf->b_u_newhead)
-	    dict_add_nr_str(dict, "newhead", 1, NULL);
+	    dict_add_number(dict, "newhead", 1);
 	if (uhp == curbuf->b_u_curhead)
-	    dict_add_nr_str(dict, "curhead", 1, NULL);
+	    dict_add_number(dict, "curhead", 1);
 	if (uhp->uh_save_nr > 0)
-	    dict_add_nr_str(dict, "save", uhp->uh_save_nr, NULL);
+	    dict_add_number(dict, "save", uhp->uh_save_nr);
 
 	if (uhp->uh_alt_next.ptr != NULL)
 	{