1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-06 09:43:13 +02:00

core: add type "hashtable" for hdata, new api functions: hdata_hashtable and hashtable_map_string

This commit is contained in:
Sebastien Helleu
2011-12-19 22:39:24 +01:00
parent 7d52f85f55
commit 6f3fd239be
25 changed files with 1786 additions and 1570 deletions
+216 -179
View File
@@ -70,6 +70,10 @@
#define API_RETURN_LONG(__long) \
return LONG2FIX (__long);
#define API_DEF_FUNC(__name, __argc) \
rb_define_module_function (ruby_mWeechat, #__name, \
&weechat_ruby_api_##__name, __argc);
/*
* weechat_ruby_api_register: startup function for all WeeChat Ruby scripts
@@ -6282,6 +6286,38 @@ weechat_ruby_api_hdata_time (VALUE class, VALUE hdata, VALUE pointer,
API_RETURN_STRING_FREE(result);
}
/*
* weechat_ruby_api_hdata_hashtable: get hashtable value of a variable in
* structure using hdata
*/
static VALUE
weechat_ruby_api_hdata_hashtable (VALUE class, VALUE hdata, VALUE pointer,
VALUE name)
{
char *c_hdata, *c_pointer, *c_name;
VALUE result_hash;
API_FUNC(1, "hdata_hashtable", API_RETURN_EMPTY);
if (NIL_P (hdata) || NIL_P (pointer) || NIL_P (name))
API_WRONG_ARGS(API_RETURN_EMPTY);
Check_Type (hdata, T_STRING);
Check_Type (pointer, T_STRING);
Check_Type (name, T_STRING);
c_hdata = StringValuePtr (hdata);
c_pointer = StringValuePtr (pointer);
c_name = StringValuePtr (name);
result_hash = weechat_ruby_hashtable_to_hash (
weechat_hdata_hashtable (script_str2ptr (c_hdata),
script_str2ptr (c_pointer),
c_name));
return result_hash;
}
/*
* weechat_ruby_api_hdata_get_string: get hdata property as string
*/
@@ -6521,183 +6557,184 @@ weechat_ruby_api_init (VALUE ruby_mWeechat)
rb_define_const(ruby_mWeechat, "WEECHAT_HOOK_SIGNAL_INT", rb_str_new2(WEECHAT_HOOK_SIGNAL_INT));
rb_define_const(ruby_mWeechat, "WEECHAT_HOOK_SIGNAL_POINTER", rb_str_new2(WEECHAT_HOOK_SIGNAL_POINTER));
rb_define_module_function (ruby_mWeechat, "register", &weechat_ruby_api_register, 7);
rb_define_module_function (ruby_mWeechat, "plugin_get_name", &weechat_ruby_api_plugin_get_name, 1);
rb_define_module_function (ruby_mWeechat, "charset_set", &weechat_ruby_api_charset_set, 1);
rb_define_module_function (ruby_mWeechat, "iconv_to_internal", &weechat_ruby_api_iconv_to_internal, 2);
rb_define_module_function (ruby_mWeechat, "iconv_from_internal", &weechat_ruby_api_iconv_from_internal, 2);
rb_define_module_function (ruby_mWeechat, "gettext", &weechat_ruby_api_gettext, 1);
rb_define_module_function (ruby_mWeechat, "ngettext", &weechat_ruby_api_ngettext, 3);
rb_define_module_function (ruby_mWeechat, "string_match", &weechat_ruby_api_string_match, 3);
rb_define_module_function (ruby_mWeechat, "string_has_highlight", &weechat_ruby_api_string_has_highlight, 2);
rb_define_module_function (ruby_mWeechat, "string_has_highlight_regex", &weechat_ruby_api_string_has_highlight_regex, 2);
rb_define_module_function (ruby_mWeechat, "string_mask_to_regex", &weechat_ruby_api_string_mask_to_regex, 1);
rb_define_module_function (ruby_mWeechat, "string_remove_color", &weechat_ruby_api_string_remove_color, 2);
rb_define_module_function (ruby_mWeechat, "string_is_command_char", &weechat_ruby_api_string_is_command_char, 1);
rb_define_module_function (ruby_mWeechat, "string_input_for_buffer", &weechat_ruby_api_string_input_for_buffer, 1);
rb_define_module_function (ruby_mWeechat, "mkdir_home", &weechat_ruby_api_mkdir_home, 2);
rb_define_module_function (ruby_mWeechat, "mkdir", &weechat_ruby_api_mkdir, 2);
rb_define_module_function (ruby_mWeechat, "mkdir_parents", &weechat_ruby_api_mkdir_parents, 2);
rb_define_module_function (ruby_mWeechat, "list_new", &weechat_ruby_api_list_new, 0);
rb_define_module_function (ruby_mWeechat, "list_add", &weechat_ruby_api_list_add, 4);
rb_define_module_function (ruby_mWeechat, "list_search", &weechat_ruby_api_list_search, 2);
rb_define_module_function (ruby_mWeechat, "list_search_pos", &weechat_ruby_api_list_search_pos, 2);
rb_define_module_function (ruby_mWeechat, "list_casesearch", &weechat_ruby_api_list_casesearch, 2);
rb_define_module_function (ruby_mWeechat, "list_casesearch_pos", &weechat_ruby_api_list_casesearch_pos, 2);
rb_define_module_function (ruby_mWeechat, "list_get", &weechat_ruby_api_list_get, 2);
rb_define_module_function (ruby_mWeechat, "list_set", &weechat_ruby_api_list_set, 2);
rb_define_module_function (ruby_mWeechat, "list_next", &weechat_ruby_api_list_next, 1);
rb_define_module_function (ruby_mWeechat, "list_prev", &weechat_ruby_api_list_prev, 1);
rb_define_module_function (ruby_mWeechat, "list_string", &weechat_ruby_api_list_string, 1);
rb_define_module_function (ruby_mWeechat, "list_size", &weechat_ruby_api_list_size, 1);
rb_define_module_function (ruby_mWeechat, "list_remove", &weechat_ruby_api_list_remove, 2);
rb_define_module_function (ruby_mWeechat, "list_remove_all", &weechat_ruby_api_list_remove_all, 1);
rb_define_module_function (ruby_mWeechat, "list_free", &weechat_ruby_api_list_free, 1);
rb_define_module_function (ruby_mWeechat, "config_new", &weechat_ruby_api_config_new, 3);
rb_define_module_function (ruby_mWeechat, "config_new_section", &weechat_ruby_api_config_new_section, 14);
rb_define_module_function (ruby_mWeechat, "config_search_section", &weechat_ruby_api_config_search_section, 2);
rb_define_module_function (ruby_mWeechat, "config_new_option", &weechat_ruby_api_config_new_option, 17);
rb_define_module_function (ruby_mWeechat, "config_search_option", &weechat_ruby_api_config_search_option, 3);
rb_define_module_function (ruby_mWeechat, "config_string_to_boolean", &weechat_ruby_api_config_string_to_boolean, 1);
rb_define_module_function (ruby_mWeechat, "config_option_reset", &weechat_ruby_api_config_option_reset, 2);
rb_define_module_function (ruby_mWeechat, "config_option_set", &weechat_ruby_api_config_option_set, 3);
rb_define_module_function (ruby_mWeechat, "config_option_set_null", &weechat_ruby_api_config_option_set_null, 2);
rb_define_module_function (ruby_mWeechat, "config_option_unset", &weechat_ruby_api_config_option_unset, 1);
rb_define_module_function (ruby_mWeechat, "config_option_rename", &weechat_ruby_api_config_option_rename, 2);
rb_define_module_function (ruby_mWeechat, "config_option_is_null", &weechat_ruby_api_config_option_is_null, 1);
rb_define_module_function (ruby_mWeechat, "config_option_default_is_null", &weechat_ruby_api_config_option_default_is_null, 1);
rb_define_module_function (ruby_mWeechat, "config_boolean", &weechat_ruby_api_config_boolean, 1);
rb_define_module_function (ruby_mWeechat, "config_boolean_default", &weechat_ruby_api_config_boolean_default, 1);
rb_define_module_function (ruby_mWeechat, "config_integer", &weechat_ruby_api_config_integer, 1);
rb_define_module_function (ruby_mWeechat, "config_integer_default", &weechat_ruby_api_config_integer_default, 1);
rb_define_module_function (ruby_mWeechat, "config_string", &weechat_ruby_api_config_string, 1);
rb_define_module_function (ruby_mWeechat, "config_string_default", &weechat_ruby_api_config_string_default, 1);
rb_define_module_function (ruby_mWeechat, "config_color", &weechat_ruby_api_config_color, 1);
rb_define_module_function (ruby_mWeechat, "config_color_default", &weechat_ruby_api_config_color_default, 1);
rb_define_module_function (ruby_mWeechat, "config_write_option", &weechat_ruby_api_config_write_option, 2);
rb_define_module_function (ruby_mWeechat, "config_write_line", &weechat_ruby_api_config_write_line, 3);
rb_define_module_function (ruby_mWeechat, "config_write", &weechat_ruby_api_config_write, 1);
rb_define_module_function (ruby_mWeechat, "config_read", &weechat_ruby_api_config_read, 1);
rb_define_module_function (ruby_mWeechat, "config_reload", &weechat_ruby_api_config_reload, 1);
rb_define_module_function (ruby_mWeechat, "config_option_free", &weechat_ruby_api_config_option_free, 1);
rb_define_module_function (ruby_mWeechat, "config_section_free_options", &weechat_ruby_api_config_section_free_options, 1);
rb_define_module_function (ruby_mWeechat, "config_section_free", &weechat_ruby_api_config_section_free, 1);
rb_define_module_function (ruby_mWeechat, "config_free", &weechat_ruby_api_config_free, 1);
rb_define_module_function (ruby_mWeechat, "config_get", &weechat_ruby_api_config_get, 1);
rb_define_module_function (ruby_mWeechat, "config_get_plugin", &weechat_ruby_api_config_get_plugin, 1);
rb_define_module_function (ruby_mWeechat, "config_is_set_plugin", &weechat_ruby_api_config_is_set_plugin, 1);
rb_define_module_function (ruby_mWeechat, "config_set_plugin", &weechat_ruby_api_config_set_plugin, 2);
rb_define_module_function (ruby_mWeechat, "config_set_desc_plugin", &weechat_ruby_api_config_set_desc_plugin, 2);
rb_define_module_function (ruby_mWeechat, "config_unset_plugin", &weechat_ruby_api_config_unset_plugin, 1);
rb_define_module_function (ruby_mWeechat, "key_bind", &weechat_ruby_api_key_bind, 2);
rb_define_module_function (ruby_mWeechat, "key_unbind", &weechat_ruby_api_key_unbind, 2);
rb_define_module_function (ruby_mWeechat, "prefix", &weechat_ruby_api_prefix, 1);
rb_define_module_function (ruby_mWeechat, "color", &weechat_ruby_api_color, 1);
rb_define_module_function (ruby_mWeechat, "print", &weechat_ruby_api_print, 2);
rb_define_module_function (ruby_mWeechat, "print_date_tags", &weechat_ruby_api_print_date_tags, 4);
rb_define_module_function (ruby_mWeechat, "print_y", &weechat_ruby_api_print_y, 3);
rb_define_module_function (ruby_mWeechat, "log_print", &weechat_ruby_api_log_print, 1);
rb_define_module_function (ruby_mWeechat, "hook_command", &weechat_ruby_api_hook_command, 7);
rb_define_module_function (ruby_mWeechat, "hook_command_run", &weechat_ruby_api_hook_command_run, 3);
rb_define_module_function (ruby_mWeechat, "hook_timer", &weechat_ruby_api_hook_timer, 5);
rb_define_module_function (ruby_mWeechat, "hook_fd", &weechat_ruby_api_hook_fd, 6);
rb_define_module_function (ruby_mWeechat, "hook_process", &weechat_ruby_api_hook_process, 4);
rb_define_module_function (ruby_mWeechat, "hook_connect", &weechat_ruby_api_hook_connect, 8);
rb_define_module_function (ruby_mWeechat, "hook_print", &weechat_ruby_api_hook_print, 6);
rb_define_module_function (ruby_mWeechat, "hook_signal", &weechat_ruby_api_hook_signal, 3);
rb_define_module_function (ruby_mWeechat, "hook_signal_send", &weechat_ruby_api_hook_signal_send, 3);
rb_define_module_function (ruby_mWeechat, "hook_hsignal", &weechat_ruby_api_hook_hsignal, 3);
rb_define_module_function (ruby_mWeechat, "hook_hsignal_send", &weechat_ruby_api_hook_hsignal_send, 2);
rb_define_module_function (ruby_mWeechat, "hook_config", &weechat_ruby_api_hook_config, 3);
rb_define_module_function (ruby_mWeechat, "hook_completion", &weechat_ruby_api_hook_completion, 4);
rb_define_module_function (ruby_mWeechat, "hook_completion_list_add", &weechat_ruby_api_hook_completion_list_add, 4);
rb_define_module_function (ruby_mWeechat, "hook_modifier", &weechat_ruby_api_hook_modifier, 3);
rb_define_module_function (ruby_mWeechat, "hook_modifier_exec", &weechat_ruby_api_hook_modifier_exec, 3);
rb_define_module_function (ruby_mWeechat, "hook_info", &weechat_ruby_api_hook_info, 5);
rb_define_module_function (ruby_mWeechat, "hook_info_hashtable", &weechat_ruby_api_hook_info_hashtable, 6);
rb_define_module_function (ruby_mWeechat, "hook_infolist", &weechat_ruby_api_hook_infolist, 6);
rb_define_module_function (ruby_mWeechat, "hook_focus", &weechat_ruby_api_hook_focus, 3);
rb_define_module_function (ruby_mWeechat, "unhook", &weechat_ruby_api_unhook, 1);
rb_define_module_function (ruby_mWeechat, "unhook_all", &weechat_ruby_api_unhook_all, 0);
rb_define_module_function (ruby_mWeechat, "buffer_new", &weechat_ruby_api_buffer_new, 5);
rb_define_module_function (ruby_mWeechat, "buffer_search", &weechat_ruby_api_buffer_search, 2);
rb_define_module_function (ruby_mWeechat, "buffer_search_main", &weechat_ruby_api_buffer_search_main, 0);
rb_define_module_function (ruby_mWeechat, "current_buffer", &weechat_ruby_api_current_buffer, 0);
rb_define_module_function (ruby_mWeechat, "buffer_clear", &weechat_ruby_api_buffer_clear, 1);
rb_define_module_function (ruby_mWeechat, "buffer_close", &weechat_ruby_api_buffer_close, 1);
rb_define_module_function (ruby_mWeechat, "buffer_merge", &weechat_ruby_api_buffer_merge, 2);
rb_define_module_function (ruby_mWeechat, "buffer_unmerge", &weechat_ruby_api_buffer_unmerge, 2);
rb_define_module_function (ruby_mWeechat, "buffer_get_integer", &weechat_ruby_api_buffer_get_integer, 2);
rb_define_module_function (ruby_mWeechat, "buffer_get_string", &weechat_ruby_api_buffer_get_string, 2);
rb_define_module_function (ruby_mWeechat, "buffer_get_pointer", &weechat_ruby_api_buffer_get_pointer, 2);
rb_define_module_function (ruby_mWeechat, "buffer_set", &weechat_ruby_api_buffer_set, 3);
rb_define_module_function (ruby_mWeechat, "buffer_string_replace_local_var", &weechat_ruby_api_buffer_string_replace_local_var, 2);
rb_define_module_function (ruby_mWeechat, "buffer_match_list", &weechat_ruby_api_buffer_match_list, 2);
rb_define_module_function (ruby_mWeechat, "current_window", &weechat_ruby_api_current_window, 0);
rb_define_module_function (ruby_mWeechat, "window_search_with_buffer", &weechat_ruby_api_window_search_with_buffer, 1);
rb_define_module_function (ruby_mWeechat, "window_get_integer", &weechat_ruby_api_window_get_integer, 2);
rb_define_module_function (ruby_mWeechat, "window_get_string", &weechat_ruby_api_window_get_string, 2);
rb_define_module_function (ruby_mWeechat, "window_get_pointer", &weechat_ruby_api_window_get_pointer, 2);
rb_define_module_function (ruby_mWeechat, "window_set_title", &weechat_ruby_api_window_set_title, 1);
rb_define_module_function (ruby_mWeechat, "nicklist_add_group", &weechat_ruby_api_nicklist_add_group, 5);
rb_define_module_function (ruby_mWeechat, "nicklist_search_group", &weechat_ruby_api_nicklist_search_group, 3);
rb_define_module_function (ruby_mWeechat, "nicklist_add_nick", &weechat_ruby_api_nicklist_add_nick, 7);
rb_define_module_function (ruby_mWeechat, "nicklist_search_nick", &weechat_ruby_api_nicklist_search_nick, 3);
rb_define_module_function (ruby_mWeechat, "nicklist_remove_group", &weechat_ruby_api_nicklist_remove_group, 2);
rb_define_module_function (ruby_mWeechat, "nicklist_remove_nick", &weechat_ruby_api_nicklist_remove_nick, 2);
rb_define_module_function (ruby_mWeechat, "nicklist_remove_all", &weechat_ruby_api_nicklist_remove_all, 1);
rb_define_module_function (ruby_mWeechat, "nicklist_group_get_integer", &weechat_ruby_api_nicklist_group_get_integer, 3);
rb_define_module_function (ruby_mWeechat, "nicklist_group_get_string", &weechat_ruby_api_nicklist_group_get_string, 3);
rb_define_module_function (ruby_mWeechat, "nicklist_group_get_pointer", &weechat_ruby_api_nicklist_group_get_pointer, 3);
rb_define_module_function (ruby_mWeechat, "nicklist_group_set", &weechat_ruby_api_nicklist_group_set, 4);
rb_define_module_function (ruby_mWeechat, "nicklist_nick_get_integer", &weechat_ruby_api_nicklist_nick_get_integer, 3);
rb_define_module_function (ruby_mWeechat, "nicklist_nick_get_string", &weechat_ruby_api_nicklist_nick_get_string, 3);
rb_define_module_function (ruby_mWeechat, "nicklist_nick_get_pointer", &weechat_ruby_api_nicklist_nick_get_pointer, 3);
rb_define_module_function (ruby_mWeechat, "nicklist_nick_set", &weechat_ruby_api_nicklist_nick_set, 4);
rb_define_module_function (ruby_mWeechat, "bar_item_search", &weechat_ruby_api_bar_item_search, 1);
rb_define_module_function (ruby_mWeechat, "bar_item_new", &weechat_ruby_api_bar_item_new, 3);
rb_define_module_function (ruby_mWeechat, "bar_item_update", &weechat_ruby_api_bar_item_update, 1);
rb_define_module_function (ruby_mWeechat, "bar_item_remove", &weechat_ruby_api_bar_item_remove, 1);
rb_define_module_function (ruby_mWeechat, "bar_search", &weechat_ruby_api_bar_search, 1);
rb_define_module_function (ruby_mWeechat, "bar_new", &weechat_ruby_api_bar_new, 15);
rb_define_module_function (ruby_mWeechat, "bar_set", &weechat_ruby_api_bar_set, 3);
rb_define_module_function (ruby_mWeechat, "bar_update", &weechat_ruby_api_bar_update, 1);
rb_define_module_function (ruby_mWeechat, "bar_remove", &weechat_ruby_api_bar_remove, 1);
rb_define_module_function (ruby_mWeechat, "command", &weechat_ruby_api_command, 2);
rb_define_module_function (ruby_mWeechat, "info_get", &weechat_ruby_api_info_get, 2);
rb_define_module_function (ruby_mWeechat, "info_get_hashtable", &weechat_ruby_api_info_get_hashtable, 2);
rb_define_module_function (ruby_mWeechat, "infolist_new", &weechat_ruby_api_infolist_new, 0);
rb_define_module_function (ruby_mWeechat, "infolist_new_item", &weechat_ruby_api_infolist_new_item, 1);
rb_define_module_function (ruby_mWeechat, "infolist_new_var_integer", &weechat_ruby_api_infolist_new_var_integer, 3);
rb_define_module_function (ruby_mWeechat, "infolist_new_var_string", &weechat_ruby_api_infolist_new_var_string, 3);
rb_define_module_function (ruby_mWeechat, "infolist_new_var_pointer", &weechat_ruby_api_infolist_new_var_pointer, 3);
rb_define_module_function (ruby_mWeechat, "infolist_new_var_time", &weechat_ruby_api_infolist_new_var_time, 3);
rb_define_module_function (ruby_mWeechat, "infolist_get", &weechat_ruby_api_infolist_get, 3);
rb_define_module_function (ruby_mWeechat, "infolist_next", &weechat_ruby_api_infolist_next, 1);
rb_define_module_function (ruby_mWeechat, "infolist_prev", &weechat_ruby_api_infolist_prev, 1);
rb_define_module_function (ruby_mWeechat, "infolist_reset_item_cursor", &weechat_ruby_api_infolist_reset_item_cursor, 1);
rb_define_module_function (ruby_mWeechat, "infolist_fields", &weechat_ruby_api_infolist_fields, 1);
rb_define_module_function (ruby_mWeechat, "infolist_integer", &weechat_ruby_api_infolist_integer, 2);
rb_define_module_function (ruby_mWeechat, "infolist_string", &weechat_ruby_api_infolist_string, 2);
rb_define_module_function (ruby_mWeechat, "infolist_pointer", &weechat_ruby_api_infolist_pointer, 2);
rb_define_module_function (ruby_mWeechat, "infolist_time", &weechat_ruby_api_infolist_time, 2);
rb_define_module_function (ruby_mWeechat, "infolist_free", &weechat_ruby_api_infolist_free, 1);
rb_define_module_function (ruby_mWeechat, "hdata_get", &weechat_ruby_api_hdata_get, 1);
rb_define_module_function (ruby_mWeechat, "hdata_get_var_offset", &weechat_ruby_api_hdata_get_var_offset, 2);
rb_define_module_function (ruby_mWeechat, "hdata_get_var_type_string", &weechat_ruby_api_hdata_get_var_type_string, 2);
rb_define_module_function (ruby_mWeechat, "hdata_get_var_hdata", &weechat_ruby_api_hdata_get_var_hdata, 2);
rb_define_module_function (ruby_mWeechat, "hdata_get_list", &weechat_ruby_api_hdata_get_list, 2);
rb_define_module_function (ruby_mWeechat, "hdata_check_pointer", &weechat_ruby_api_hdata_check_pointer, 3);
rb_define_module_function (ruby_mWeechat, "hdata_move", &weechat_ruby_api_hdata_move, 3);
rb_define_module_function (ruby_mWeechat, "hdata_char", &weechat_ruby_api_hdata_char, 3);
rb_define_module_function (ruby_mWeechat, "hdata_integer", &weechat_ruby_api_hdata_integer, 3);
rb_define_module_function (ruby_mWeechat, "hdata_long", &weechat_ruby_api_hdata_long, 3);
rb_define_module_function (ruby_mWeechat, "hdata_string", &weechat_ruby_api_hdata_string, 3);
rb_define_module_function (ruby_mWeechat, "hdata_pointer", &weechat_ruby_api_hdata_pointer, 3);
rb_define_module_function (ruby_mWeechat, "hdata_time", &weechat_ruby_api_hdata_time, 3);
rb_define_module_function (ruby_mWeechat, "hdata_get_string", &weechat_ruby_api_hdata_get_string, 2);
rb_define_module_function (ruby_mWeechat, "upgrade_new", &weechat_ruby_api_upgrade_new, 2);
rb_define_module_function (ruby_mWeechat, "upgrade_write_object", &weechat_ruby_api_upgrade_write_object, 3);
rb_define_module_function (ruby_mWeechat, "upgrade_read", &weechat_ruby_api_upgrade_read, 3);
rb_define_module_function (ruby_mWeechat, "upgrade_close", &weechat_ruby_api_upgrade_close, 1);
API_DEF_FUNC(register, 7);
API_DEF_FUNC(plugin_get_name, 1);
API_DEF_FUNC(charset_set, 1);
API_DEF_FUNC(iconv_to_internal, 2);
API_DEF_FUNC(iconv_from_internal, 2);
API_DEF_FUNC(gettext, 1);
API_DEF_FUNC(ngettext, 3);
API_DEF_FUNC(string_match, 3);
API_DEF_FUNC(string_has_highlight, 2);
API_DEF_FUNC(string_has_highlight_regex, 2);
API_DEF_FUNC(string_mask_to_regex, 1);
API_DEF_FUNC(string_remove_color, 2);
API_DEF_FUNC(string_is_command_char, 1);
API_DEF_FUNC(string_input_for_buffer, 1);
API_DEF_FUNC(mkdir_home, 2);
API_DEF_FUNC(mkdir, 2);
API_DEF_FUNC(mkdir_parents, 2);
API_DEF_FUNC(list_new, 0);
API_DEF_FUNC(list_add, 4);
API_DEF_FUNC(list_search, 2);
API_DEF_FUNC(list_search_pos, 2);
API_DEF_FUNC(list_casesearch, 2);
API_DEF_FUNC(list_casesearch_pos, 2);
API_DEF_FUNC(list_get, 2);
API_DEF_FUNC(list_set, 2);
API_DEF_FUNC(list_next, 1);
API_DEF_FUNC(list_prev, 1);
API_DEF_FUNC(list_string, 1);
API_DEF_FUNC(list_size, 1);
API_DEF_FUNC(list_remove, 2);
API_DEF_FUNC(list_remove_all, 1);
API_DEF_FUNC(list_free, 1);
API_DEF_FUNC(config_new, 3);
API_DEF_FUNC(config_new_section, 14);
API_DEF_FUNC(config_search_section, 2);
API_DEF_FUNC(config_new_option, 17);
API_DEF_FUNC(config_search_option, 3);
API_DEF_FUNC(config_string_to_boolean, 1);
API_DEF_FUNC(config_option_reset, 2);
API_DEF_FUNC(config_option_set, 3);
API_DEF_FUNC(config_option_set_null, 2);
API_DEF_FUNC(config_option_unset, 1);
API_DEF_FUNC(config_option_rename, 2);
API_DEF_FUNC(config_option_is_null, 1);
API_DEF_FUNC(config_option_default_is_null, 1);
API_DEF_FUNC(config_boolean, 1);
API_DEF_FUNC(config_boolean_default, 1);
API_DEF_FUNC(config_integer, 1);
API_DEF_FUNC(config_integer_default, 1);
API_DEF_FUNC(config_string, 1);
API_DEF_FUNC(config_string_default, 1);
API_DEF_FUNC(config_color, 1);
API_DEF_FUNC(config_color_default, 1);
API_DEF_FUNC(config_write_option, 2);
API_DEF_FUNC(config_write_line, 3);
API_DEF_FUNC(config_write, 1);
API_DEF_FUNC(config_read, 1);
API_DEF_FUNC(config_reload, 1);
API_DEF_FUNC(config_option_free, 1);
API_DEF_FUNC(config_section_free_options, 1);
API_DEF_FUNC(config_section_free, 1);
API_DEF_FUNC(config_free, 1);
API_DEF_FUNC(config_get, 1);
API_DEF_FUNC(config_get_plugin, 1);
API_DEF_FUNC(config_is_set_plugin, 1);
API_DEF_FUNC(config_set_plugin, 2);
API_DEF_FUNC(config_set_desc_plugin, 2);
API_DEF_FUNC(config_unset_plugin, 1);
API_DEF_FUNC(key_bind, 2);
API_DEF_FUNC(key_unbind, 2);
API_DEF_FUNC(prefix, 1);
API_DEF_FUNC(color, 1);
API_DEF_FUNC(print, 2);
API_DEF_FUNC(print_date_tags, 4);
API_DEF_FUNC(print_y, 3);
API_DEF_FUNC(log_print, 1);
API_DEF_FUNC(hook_command, 7);
API_DEF_FUNC(hook_command_run, 3);
API_DEF_FUNC(hook_timer, 5);
API_DEF_FUNC(hook_fd, 6);
API_DEF_FUNC(hook_process, 4);
API_DEF_FUNC(hook_connect, 8);
API_DEF_FUNC(hook_print, 6);
API_DEF_FUNC(hook_signal, 3);
API_DEF_FUNC(hook_signal_send, 3);
API_DEF_FUNC(hook_hsignal, 3);
API_DEF_FUNC(hook_hsignal_send, 2);
API_DEF_FUNC(hook_config, 3);
API_DEF_FUNC(hook_completion, 4);
API_DEF_FUNC(hook_completion_list_add, 4);
API_DEF_FUNC(hook_modifier, 3);
API_DEF_FUNC(hook_modifier_exec, 3);
API_DEF_FUNC(hook_info, 5);
API_DEF_FUNC(hook_info_hashtable, 6);
API_DEF_FUNC(hook_infolist, 6);
API_DEF_FUNC(hook_focus, 3);
API_DEF_FUNC(unhook, 1);
API_DEF_FUNC(unhook_all, 0);
API_DEF_FUNC(buffer_new, 5);
API_DEF_FUNC(buffer_search, 2);
API_DEF_FUNC(buffer_search_main, 0);
API_DEF_FUNC(current_buffer, 0);
API_DEF_FUNC(buffer_clear, 1);
API_DEF_FUNC(buffer_close, 1);
API_DEF_FUNC(buffer_merge, 2);
API_DEF_FUNC(buffer_unmerge, 2);
API_DEF_FUNC(buffer_get_integer, 2);
API_DEF_FUNC(buffer_get_string, 2);
API_DEF_FUNC(buffer_get_pointer, 2);
API_DEF_FUNC(buffer_set, 3);
API_DEF_FUNC(buffer_string_replace_local_var, 2);
API_DEF_FUNC(buffer_match_list, 2);
API_DEF_FUNC(current_window, 0);
API_DEF_FUNC(window_search_with_buffer, 1);
API_DEF_FUNC(window_get_integer, 2);
API_DEF_FUNC(window_get_string, 2);
API_DEF_FUNC(window_get_pointer, 2);
API_DEF_FUNC(window_set_title, 1);
API_DEF_FUNC(nicklist_add_group, 5);
API_DEF_FUNC(nicklist_search_group, 3);
API_DEF_FUNC(nicklist_add_nick, 7);
API_DEF_FUNC(nicklist_search_nick, 3);
API_DEF_FUNC(nicklist_remove_group, 2);
API_DEF_FUNC(nicklist_remove_nick, 2);
API_DEF_FUNC(nicklist_remove_all, 1);
API_DEF_FUNC(nicklist_group_get_integer, 3);
API_DEF_FUNC(nicklist_group_get_string, 3);
API_DEF_FUNC(nicklist_group_get_pointer, 3);
API_DEF_FUNC(nicklist_group_set, 4);
API_DEF_FUNC(nicklist_nick_get_integer, 3);
API_DEF_FUNC(nicklist_nick_get_string, 3);
API_DEF_FUNC(nicklist_nick_get_pointer, 3);
API_DEF_FUNC(nicklist_nick_set, 4);
API_DEF_FUNC(bar_item_search, 1);
API_DEF_FUNC(bar_item_new, 3);
API_DEF_FUNC(bar_item_update, 1);
API_DEF_FUNC(bar_item_remove, 1);
API_DEF_FUNC(bar_search, 1);
API_DEF_FUNC(bar_new, 15);
API_DEF_FUNC(bar_set, 3);
API_DEF_FUNC(bar_update, 1);
API_DEF_FUNC(bar_remove, 1);
API_DEF_FUNC(command, 2);
API_DEF_FUNC(info_get, 2);
API_DEF_FUNC(info_get_hashtable, 2);
API_DEF_FUNC(infolist_new, 0);
API_DEF_FUNC(infolist_new_item, 1);
API_DEF_FUNC(infolist_new_var_integer, 3);
API_DEF_FUNC(infolist_new_var_string, 3);
API_DEF_FUNC(infolist_new_var_pointer, 3);
API_DEF_FUNC(infolist_new_var_time, 3);
API_DEF_FUNC(infolist_get, 3);
API_DEF_FUNC(infolist_next, 1);
API_DEF_FUNC(infolist_prev, 1);
API_DEF_FUNC(infolist_reset_item_cursor, 1);
API_DEF_FUNC(infolist_fields, 1);
API_DEF_FUNC(infolist_integer, 2);
API_DEF_FUNC(infolist_string, 2);
API_DEF_FUNC(infolist_pointer, 2);
API_DEF_FUNC(infolist_time, 2);
API_DEF_FUNC(infolist_free, 1);
API_DEF_FUNC(hdata_get, 1);
API_DEF_FUNC(hdata_get_var_offset, 2);
API_DEF_FUNC(hdata_get_var_type_string, 2);
API_DEF_FUNC(hdata_get_var_hdata, 2);
API_DEF_FUNC(hdata_get_list, 2);
API_DEF_FUNC(hdata_check_pointer, 3);
API_DEF_FUNC(hdata_move, 3);
API_DEF_FUNC(hdata_char, 3);
API_DEF_FUNC(hdata_integer, 3);
API_DEF_FUNC(hdata_long, 3);
API_DEF_FUNC(hdata_string, 3);
API_DEF_FUNC(hdata_pointer, 3);
API_DEF_FUNC(hdata_time, 3);
API_DEF_FUNC(hdata_hashtable, 3);
API_DEF_FUNC(hdata_get_string, 2);
API_DEF_FUNC(upgrade_new, 2);
API_DEF_FUNC(upgrade_write_object, 3);
API_DEF_FUNC(upgrade_read, 3);
API_DEF_FUNC(upgrade_close, 1);
}