From c98d12b4af7c1b783e9b4d17fbb2fdbc400a9464 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Fri, 15 Mar 2024 18:38:22 +0100 Subject: [PATCH] core: rename variables with creation time in hdata "hotlist" Variables renamed: - "creation_time.tv_sec" -> "time" - "creation_time.tv_usec" -> "time_usec" --- ChangeLog.adoc | 1 + src/gui/gui-hotlist.c | 4 ++-- tests/scripts/python/testapi.py | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 52aad9365..dec91f702 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -15,6 +15,7 @@ For a list of important changes that require manual actions, please look at rele New features:: + * core: rename variables with creation time in hdata "hotlist": "creation_time.tv_sec" to "time" and "creation_time.tv_usec" to "time_usec" * core: add unique identifier "id" in buffer (issue #2081) * core: add option `malloc_trim` in command `/sys` * core: add support of SGR mouse events (issue #2082) diff --git a/src/gui/gui-hotlist.c b/src/gui/gui-hotlist.c index 8b1bbc467..fdeb5985f 100644 --- a/src/gui/gui-hotlist.c +++ b/src/gui/gui-hotlist.c @@ -746,8 +746,8 @@ gui_hotlist_hdata_hotlist_cb (const void *pointer, void *data, if (hdata) { HDATA_VAR(struct t_gui_hotlist, priority, INTEGER, 0, NULL, NULL); - HDATA_VAR(struct t_gui_hotlist, creation_time.tv_sec, TIME, 0, NULL, NULL); - HDATA_VAR(struct t_gui_hotlist, creation_time.tv_usec, LONG, 0, NULL, NULL); + HDATA_VAR_NAME(struct t_gui_hotlist, creation_time.tv_sec, "time", TIME, 0, NULL, NULL); + HDATA_VAR_NAME(struct t_gui_hotlist, creation_time.tv_usec, "time_usec", LONG, 0, NULL, NULL); HDATA_VAR(struct t_gui_hotlist, buffer, POINTER, 0, NULL, "buffer"); HDATA_VAR(struct t_gui_hotlist, count, INTEGER, 0, GUI_HOTLIST_NUM_PRIORITIES_STR, NULL); HDATA_VAR(struct t_gui_hotlist, prev_hotlist, POINTER, 0, NULL, hdata_name); diff --git a/tests/scripts/python/testapi.py b/tests/scripts/python/testapi.py index 920b8ddc3..80c9c8c88 100644 --- a/tests/scripts/python/testapi.py +++ b/tests/scripts/python/testapi.py @@ -715,7 +715,8 @@ def test_hdata(): check(weechat.hdata_get_var_type_string(hdata_line_data, 'displayed') == 'char') check(weechat.hdata_get_var_type_string(hdata_line_data, 'prefix') == 'shared_string') check(weechat.hdata_get_var_type_string(hdata_line_data, 'date') == 'time') - check(weechat.hdata_get_var_type_string(hdata_hotlist, 'creation_time.tv_usec') == 'long') + check(weechat.hdata_get_var_type_string(hdata_hotlist, 'time') == 'time') + check(weechat.hdata_get_var_type_string(hdata_hotlist, 'time_usec') == 'long') check(weechat.hdata_get_var_type_string(hdata_irc_server, 'sasl_scram_salted_pwd') == 'other') # hdata_get_var_array_size check(weechat.hdata_get_var_array_size(hdata_buffer, buffer2, 'name') == -1)