diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-07-08 16:50:37 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-07-08 16:50:37 +0200 |
commit | e0be167a805fd547c25ec1ec97fd4c7f13046236 (patch) | |
tree | 423fb96f7b30329ef0b7ccf3d4b2a02620e7929c /src/ex_cmds2.c | |
parent | 4cde86c2ef885e82fff3d925dee9fb5671c025cf (diff) |
patch 8.1.0166: using dict_add_nr_str() is clumsyv8.1.0166
Problem: Using dict_add_nr_str() is clumsy.
Solution: Split into two functions. (Ozaki Kiichi, closes #3154)
Diffstat (limited to 'src/ex_cmds2.c')
-rw-r--r-- | src/ex_cmds2.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c index 5f58fedfb7..6887ca1358 100644 --- a/src/ex_cmds2.c +++ b/src/ex_cmds2.c @@ -689,7 +689,7 @@ dbg_parsearg( } /* - * ":breakadd". + * ":breakadd". Also used for ":profile". */ void ex_breakadd(exarg_T *eap) @@ -1497,16 +1497,16 @@ add_timer_info(typval_T *rettv, timer_T *timer) return; list_append_dict(list, dict); - dict_add_nr_str(dict, "id", timer->tr_id, NULL); - dict_add_nr_str(dict, "time", (long)timer->tr_interval, NULL); + dict_add_number(dict, "id", timer->tr_id); + dict_add_number(dict, "time", (long)timer->tr_interval); profile_start(&now); remaining = proftime_time_left(&timer->tr_due, &now); - dict_add_nr_str(dict, "remaining", (long)remaining, NULL); + dict_add_number(dict, "remaining", (long)remaining); - dict_add_nr_str(dict, "repeat", - (long)(timer->tr_repeat < 0 ? -1 : timer->tr_repeat + 1), NULL); - dict_add_nr_str(dict, "paused", (long)(timer->tr_paused), NULL); + dict_add_number(dict, "repeat", + (long)(timer->tr_repeat < 0 ? -1 : timer->tr_repeat + 1)); + dict_add_number(dict, "paused", (long)(timer->tr_paused)); di = dictitem_alloc((char_u *)"callback"); if (di != NULL) |