1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-27 05:16:38 +02:00

api: allow hashtable with keys that are not strings in function hashtable_add_to_infolist

This commit is contained in:
Sebastien Helleu
2013-03-07 13:20:16 +01:00
parent 8b925baa3c
commit b352891c2b
2 changed files with 6 additions and 4 deletions
+3 -1
View File
@@ -1,7 +1,7 @@
WeeChat ChangeLog
=================
Sébastien Helleu <flashcode@flashtux.org>
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)
+3 -3
View File
@@ -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);