summaryrefslogtreecommitdiff
path: root/src/core/wee-hashtable.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2013-03-07 13:20:16 +0100
committerSebastien Helleu <flashcode@flashtux.org>2013-03-07 13:20:16 +0100
commitb352891c2b39ea1c3eb6423219e38c7d571923b2 (patch)
tree4ddd8ef9a1b86d74e08b8b132e8670781a60f934 /src/core/wee-hashtable.c
parent8b925baa3cff083653b38603cf19090748d9a82e (diff)
downloadweechat-b352891c2b39ea1c3eb6423219e38c7d571923b2.zip
api: allow hashtable with keys that are not strings in function hashtable_add_to_infolist
Diffstat (limited to 'src/core/wee-hashtable.c')
-rw-r--r--src/core/wee-hashtable.c6
1 files changed, 3 insertions, 3 deletions
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);