diff --git a/ChangeLog b/ChangeLog index fde29a8b4..2a580c1b4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,7 @@ WeeChat ChangeLog ================= Sébastien Helleu -v0.4.1-dev, 2013-03-03 +v0.4.1-dev, 2013-03-07 This document lists all changes for each version. @@ -27,6 +27,8 @@ Version 0.4.1 (under dev!) weechat.history.max_buffer_lines_minutes is set (bug #38197) * core: use default hash/comparison callback for keys of type integer/pointer/time in hashtable +* api: allow hashtable with keys that are not strings in function + hashtable_add_to_infolist * api: fix function string_mask_to_regex: escape all special chars used in regex (bug #38398) * aspell: add completion "aspell_dicts" (list of aspell installed dictionaries) diff --git a/src/core/wee-hashtable.c b/src/core/wee-hashtable.c index 945b6c38a..5ea3fea08 100644 --- a/src/core/wee-hashtable.c +++ b/src/core/wee-hashtable.c @@ -1022,8 +1022,7 @@ hashtable_add_to_infolist (struct t_hashtable *hashtable, struct t_hashtable_item *ptr_item; char option_name[128]; - if (!hashtable || (hashtable->type_keys != HASHTABLE_STRING) - || !infolist_item || !prefix) + if (!hashtable || !infolist_item || !prefix) return 0; item_number = 0; @@ -1035,7 +1034,8 @@ hashtable_add_to_infolist (struct t_hashtable *hashtable, snprintf (option_name, sizeof (option_name), "%s_name_%05d", prefix, item_number); if (!infolist_new_var_string (infolist_item, option_name, - (const char *)ptr_item->key)) + hashtable_to_string (hashtable->type_keys, + ptr_item->key))) return 0; snprintf (option_name, sizeof (option_name), "%s_value_%05d", prefix, item_number);