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:
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user