summaryrefslogtreecommitdiff
path: root/src/plugins/scripts/python
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/scripts/python')
-rw-r--r--src/plugins/scripts/python/weechat-python-api.c388
-rw-r--r--src/plugins/scripts/python/weechat-python.c14
2 files changed, 216 insertions, 186 deletions
diff --git a/src/plugins/scripts/python/weechat-python-api.c b/src/plugins/scripts/python/weechat-python-api.c
index 0048ee518..dc3ece4ae 100644
--- a/src/plugins/scripts/python/weechat-python-api.c
+++ b/src/plugins/scripts/python/weechat-python-api.c
@@ -72,6 +72,9 @@
#define API_RETURN_LONG(__long) \
return Py_BuildValue ("l", __long);
+#define API_DEF_FUNC(__name) \
+ { #__name, &weechat_python_api_##__name, METH_VARARGS, "" }
+
/*
* weechat_python_api_register: startup function for all WeeChat Python scripts
@@ -5456,6 +5459,32 @@ weechat_python_api_hdata_time (PyObject *self, PyObject *args)
}
/*
+ * weechat_python_api_hdata_hashtable: get hashtable value of a variable in
+ * structure using hdata
+ */
+
+static PyObject *
+weechat_python_api_hdata_hashtable (PyObject *self, PyObject *args)
+{
+ char *hdata, *pointer, *name;
+ PyObject *result_dict;
+
+ API_FUNC(1, "hdata_hashtable", API_RETURN_EMPTY);
+ hdata = NULL;
+ pointer = NULL;
+ name = NULL;
+ if (!PyArg_ParseTuple (args, "sss", &hdata, &pointer, &name))
+ API_WRONG_ARGS(API_RETURN_EMPTY);
+
+ result_dict = weechat_python_hashtable_to_dict (
+ weechat_hdata_hashtable (script_str2ptr (hdata),
+ script_str2ptr (pointer),
+ name));
+
+ return result_dict;
+}
+
+/*
* weechat_python_api_hdata_get_string: get hdata property as string
*/
@@ -5623,184 +5652,185 @@ weechat_python_api_upgrade_close (PyObject *self, PyObject *args)
PyMethodDef weechat_python_funcs[] =
{
- { "register", &weechat_python_api_register, METH_VARARGS, "" },
- { "plugin_get_name", &weechat_python_api_plugin_get_name, METH_VARARGS, "" },
- { "charset_set", &weechat_python_api_charset_set, METH_VARARGS, "" },
- { "iconv_to_internal", &weechat_python_api_iconv_to_internal, METH_VARARGS, "" },
- { "iconv_from_internal", &weechat_python_api_iconv_from_internal, METH_VARARGS, "" },
- { "gettext", &weechat_python_api_gettext, METH_VARARGS, "" },
- { "ngettext", &weechat_python_api_ngettext, METH_VARARGS, "" },
- { "string_match", &weechat_python_api_string_match, METH_VARARGS, "" },
- { "string_has_highlight", &weechat_python_api_string_has_highlight, METH_VARARGS, "" },
- { "string_has_highlight_regex", &weechat_python_api_string_has_highlight_regex, METH_VARARGS, "" },
- { "string_mask_to_regex", &weechat_python_api_string_mask_to_regex, METH_VARARGS, "" },
- { "string_remove_color", &weechat_python_api_string_remove_color, METH_VARARGS, "" },
- { "string_is_command_char", &weechat_python_api_string_is_command_char, METH_VARARGS, "" },
- { "string_input_for_buffer", &weechat_python_api_string_input_for_buffer, METH_VARARGS, "" },
- { "mkdir_home", &weechat_python_api_mkdir_home, METH_VARARGS, "" },
- { "mkdir", &weechat_python_api_mkdir, METH_VARARGS, "" },
- { "mkdir_parents", &weechat_python_api_mkdir_parents, METH_VARARGS, "" },
- { "list_new", &weechat_python_api_list_new, METH_VARARGS, "" },
- { "list_add", &weechat_python_api_list_add, METH_VARARGS, "" },
- { "list_search", &weechat_python_api_list_search, METH_VARARGS, "" },
- { "list_search_pos", &weechat_python_api_list_search_pos, METH_VARARGS, "" },
- { "list_casesearch", &weechat_python_api_list_casesearch, METH_VARARGS, "" },
- { "list_casesearch_pos", &weechat_python_api_list_casesearch_pos, METH_VARARGS, "" },
- { "list_get", &weechat_python_api_list_get, METH_VARARGS, "" },
- { "list_set", &weechat_python_api_list_set, METH_VARARGS, "" },
- { "list_next", &weechat_python_api_list_next, METH_VARARGS, "" },
- { "list_prev", &weechat_python_api_list_prev, METH_VARARGS, "" },
- { "list_string", &weechat_python_api_list_string, METH_VARARGS, "" },
- { "list_size", &weechat_python_api_list_size, METH_VARARGS, "" },
- { "list_remove", &weechat_python_api_list_remove, METH_VARARGS, "" },
- { "list_remove_all", &weechat_python_api_list_remove_all, METH_VARARGS, "" },
- { "list_free", &weechat_python_api_list_free, METH_VARARGS, "" },
- { "config_new", &weechat_python_api_config_new, METH_VARARGS, "" },
- { "config_new_section", &weechat_python_api_config_new_section, METH_VARARGS, "" },
- { "config_search_section", &weechat_python_api_config_search_section, METH_VARARGS, "" },
- { "config_new_option", &weechat_python_api_config_new_option, METH_VARARGS, "" },
- { "config_search_option", &weechat_python_api_config_search_option, METH_VARARGS, "" },
- { "config_string_to_boolean", &weechat_python_api_config_string_to_boolean, METH_VARARGS, "" },
- { "config_option_reset", &weechat_python_api_config_option_reset, METH_VARARGS, "" },
- { "config_option_set", &weechat_python_api_config_option_set, METH_VARARGS, "" },
- { "config_option_set_null", &weechat_python_api_config_option_set_null, METH_VARARGS, "" },
- { "config_option_unset", &weechat_python_api_config_option_unset, METH_VARARGS, "" },
- { "config_option_rename", &weechat_python_api_config_option_rename, METH_VARARGS, "" },
- { "config_option_is_null", &weechat_python_api_config_option_is_null, METH_VARARGS, "" },
- { "config_option_default_is_null", &weechat_python_api_config_option_default_is_null, METH_VARARGS, "" },
- { "config_boolean", &weechat_python_api_config_boolean, METH_VARARGS, "" },
- { "config_boolean_default", &weechat_python_api_config_boolean_default, METH_VARARGS, "" },
- { "config_integer", &weechat_python_api_config_integer, METH_VARARGS, "" },
- { "config_integer_default", &weechat_python_api_config_integer_default, METH_VARARGS, "" },
- { "config_string", &weechat_python_api_config_string, METH_VARARGS, "" },
- { "config_string_default", &weechat_python_api_config_string_default, METH_VARARGS, "" },
- { "config_color", &weechat_python_api_config_color, METH_VARARGS, "" },
- { "config_color_default", &weechat_python_api_config_color_default, METH_VARARGS, "" },
- { "config_write_option", &weechat_python_api_config_write_option, METH_VARARGS, "" },
- { "config_write_line", &weechat_python_api_config_write_line, METH_VARARGS, "" },
- { "config_write", &weechat_python_api_config_write, METH_VARARGS, "" },
- { "config_read", &weechat_python_api_config_read, METH_VARARGS, "" },
- { "config_reload", &weechat_python_api_config_reload, METH_VARARGS, "" },
- { "config_option_free", &weechat_python_api_config_option_free, METH_VARARGS, "" },
- { "config_section_free_options", &weechat_python_api_config_section_free_options, METH_VARARGS, "" },
- { "config_section_free", &weechat_python_api_config_section_free, METH_VARARGS, "" },
- { "config_free", &weechat_python_api_config_free, METH_VARARGS, "" },
- { "config_get", &weechat_python_api_config_get, METH_VARARGS, "" },
- { "config_get_plugin", &weechat_python_api_config_get_plugin, METH_VARARGS, "" },
- { "config_is_set_plugin", &weechat_python_api_config_is_set_plugin, METH_VARARGS, "" },
- { "config_set_plugin", &weechat_python_api_config_set_plugin, METH_VARARGS, "" },
- { "config_set_desc_plugin", &weechat_python_api_config_set_desc_plugin, METH_VARARGS, "" },
- { "config_unset_plugin", &weechat_python_api_config_unset_plugin, METH_VARARGS, "" },
- { "key_bind", &weechat_python_api_key_bind, METH_VARARGS, "" },
- { "key_unbind", &weechat_python_api_key_unbind, METH_VARARGS, "" },
- { "prefix", &weechat_python_api_prefix, METH_VARARGS, "" },
- { "color", &weechat_python_api_color, METH_VARARGS, "" },
- { "prnt", &weechat_python_api_prnt, METH_VARARGS, "" },
- { "prnt_date_tags", &weechat_python_api_prnt_date_tags, METH_VARARGS, "" },
- { "prnt_y", &weechat_python_api_prnt_y, METH_VARARGS, "" },
- { "log_print", &weechat_python_api_log_print, METH_VARARGS, "" },
- { "hook_command", &weechat_python_api_hook_command, METH_VARARGS, "" },
- { "hook_command_run", &weechat_python_api_hook_command_run, METH_VARARGS, "" },
- { "hook_timer", &weechat_python_api_hook_timer, METH_VARARGS, "" },
- { "hook_fd", &weechat_python_api_hook_fd, METH_VARARGS, "" },
- { "hook_process", &weechat_python_api_hook_process, METH_VARARGS, "" },
- { "hook_connect", &weechat_python_api_hook_connect, METH_VARARGS, "" },
- { "hook_print", &weechat_python_api_hook_print, METH_VARARGS, "" },
- { "hook_signal", &weechat_python_api_hook_signal, METH_VARARGS, "" },
- { "hook_signal_send", &weechat_python_api_hook_signal_send, METH_VARARGS, "" },
- { "hook_hsignal", &weechat_python_api_hook_hsignal, METH_VARARGS, "" },
- { "hook_hsignal_send", &weechat_python_api_hook_hsignal_send, METH_VARARGS, "" },
- { "hook_config", &weechat_python_api_hook_config, METH_VARARGS, "" },
- { "hook_completion", &weechat_python_api_hook_completion, METH_VARARGS, "" },
- { "hook_completion_list_add", &weechat_python_api_hook_completion_list_add, METH_VARARGS, "" },
- { "hook_modifier", &weechat_python_api_hook_modifier, METH_VARARGS, "" },
- { "hook_modifier_exec", &weechat_python_api_hook_modifier_exec, METH_VARARGS, "" },
- { "hook_info", &weechat_python_api_hook_info, METH_VARARGS, "" },
- { "hook_info_hashtable", &weechat_python_api_hook_info_hashtable, METH_VARARGS, "" },
- { "hook_infolist", &weechat_python_api_hook_infolist, METH_VARARGS, "" },
- { "hook_focus", &weechat_python_api_hook_focus, METH_VARARGS, "" },
- { "unhook", &weechat_python_api_unhook, METH_VARARGS, "" },
- { "unhook_all", &weechat_python_api_unhook_all, METH_VARARGS, "" },
- { "buffer_new", &weechat_python_api_buffer_new, METH_VARARGS, "" },
- { "buffer_search", &weechat_python_api_buffer_search, METH_VARARGS, "" },
- { "buffer_search_main", &weechat_python_api_buffer_search_main, METH_VARARGS, "" },
- { "current_buffer", &weechat_python_api_current_buffer, METH_VARARGS, "" },
- { "buffer_clear", &weechat_python_api_buffer_clear, METH_VARARGS, "" },
- { "buffer_close", &weechat_python_api_buffer_close, METH_VARARGS, "" },
- { "buffer_merge", &weechat_python_api_buffer_merge, METH_VARARGS, "" },
- { "buffer_unmerge", &weechat_python_api_buffer_unmerge, METH_VARARGS, "" },
- { "buffer_get_integer", &weechat_python_api_buffer_get_integer, METH_VARARGS, "" },
- { "buffer_get_string", &weechat_python_api_buffer_get_string, METH_VARARGS, "" },
- { "buffer_get_pointer", &weechat_python_api_buffer_get_pointer, METH_VARARGS, "" },
- { "buffer_set", &weechat_python_api_buffer_set, METH_VARARGS, "" },
- { "buffer_string_replace_local_var", &weechat_python_api_buffer_string_replace_local_var, METH_VARARGS, "" },
- { "buffer_match_list", &weechat_python_api_buffer_match_list, METH_VARARGS, "" },
- { "current_window", &weechat_python_api_current_window, METH_VARARGS, "" },
- { "window_search_with_buffer", &weechat_python_api_window_search_with_buffer, METH_VARARGS, "" },
- { "window_get_integer", &weechat_python_api_window_get_integer, METH_VARARGS, "" },
- { "window_get_string", &weechat_python_api_window_get_string, METH_VARARGS, "" },
- { "window_get_pointer", &weechat_python_api_window_get_pointer, METH_VARARGS, "" },
- { "window_set_title", &weechat_python_api_window_set_title, METH_VARARGS, "" },
- { "nicklist_add_group", &weechat_python_api_nicklist_add_group, METH_VARARGS, "" },
- { "nicklist_search_group", &weechat_python_api_nicklist_search_group, METH_VARARGS, "" },
- { "nicklist_add_nick", &weechat_python_api_nicklist_add_nick, METH_VARARGS, "" },
- { "nicklist_search_nick", &weechat_python_api_nicklist_search_nick, METH_VARARGS, "" },
- { "nicklist_remove_group", &weechat_python_api_nicklist_remove_group, METH_VARARGS, "" },
- { "nicklist_remove_nick", &weechat_python_api_nicklist_remove_nick, METH_VARARGS, "" },
- { "nicklist_remove_all", &weechat_python_api_nicklist_remove_all, METH_VARARGS, "" },
- { "nicklist_group_get_integer", &weechat_python_api_nicklist_group_get_integer, METH_VARARGS, "" },
- { "nicklist_group_get_string", &weechat_python_api_nicklist_group_get_string, METH_VARARGS, "" },
- { "nicklist_group_get_pointer", &weechat_python_api_nicklist_group_get_pointer, METH_VARARGS, "" },
- { "nicklist_group_set", &weechat_python_api_nicklist_group_set, METH_VARARGS, "" },
- { "nicklist_nick_get_integer", &weechat_python_api_nicklist_nick_get_integer, METH_VARARGS, "" },
- { "nicklist_nick_get_string", &weechat_python_api_nicklist_nick_get_string, METH_VARARGS, "" },
- { "nicklist_nick_get_pointer", &weechat_python_api_nicklist_nick_get_pointer, METH_VARARGS, "" },
- { "nicklist_nick_set", &weechat_python_api_nicklist_nick_set, METH_VARARGS, "" },
- { "bar_item_search", &weechat_python_api_bar_item_search, METH_VARARGS, "" },
- { "bar_item_new", &weechat_python_api_bar_item_new, METH_VARARGS, "" },
- { "bar_item_update", &weechat_python_api_bar_item_update, METH_VARARGS, "" },
- { "bar_item_remove", &weechat_python_api_bar_item_remove, METH_VARARGS, "" },
- { "bar_search", &weechat_python_api_bar_search, METH_VARARGS, "" },
- { "bar_new", &weechat_python_api_bar_new, METH_VARARGS, "" },
- { "bar_set", &weechat_python_api_bar_set, METH_VARARGS, "" },
- { "bar_update", &weechat_python_api_bar_update, METH_VARARGS, "" },
- { "bar_remove", &weechat_python_api_bar_remove, METH_VARARGS, "" },
- { "command", &weechat_python_api_command, METH_VARARGS, "" },
- { "info_get", &weechat_python_api_info_get, METH_VARARGS, "" },
- { "info_get_hashtable", &weechat_python_api_info_get_hashtable, METH_VARARGS, "" },
- { "infolist_new", &weechat_python_api_infolist_new, METH_VARARGS, "" },
- { "infolist_new_item", &weechat_python_api_infolist_new_item, METH_VARARGS, "" },
- { "infolist_new_var_integer", &weechat_python_api_infolist_new_var_integer, METH_VARARGS, "" },
- { "infolist_new_var_string", &weechat_python_api_infolist_new_var_string, METH_VARARGS, "" },
- { "infolist_new_var_pointer", &weechat_python_api_infolist_new_var_pointer, METH_VARARGS, "" },
- { "infolist_new_var_time", &weechat_python_api_infolist_new_var_time, METH_VARARGS, "" },
- { "infolist_get", &weechat_python_api_infolist_get, METH_VARARGS, "" },
- { "infolist_next", &weechat_python_api_infolist_next, METH_VARARGS, "" },
- { "infolist_prev", &weechat_python_api_infolist_prev, METH_VARARGS, "" },
- { "infolist_reset_item_cursor", &weechat_python_api_infolist_reset_item_cursor, METH_VARARGS, "" },
- { "infolist_fields", &weechat_python_api_infolist_fields, METH_VARARGS, "" },
- { "infolist_integer", &weechat_python_api_infolist_integer, METH_VARARGS, "" },
- { "infolist_string", &weechat_python_api_infolist_string, METH_VARARGS, "" },
- { "infolist_pointer", &weechat_python_api_infolist_pointer, METH_VARARGS, "" },
- { "infolist_time", &weechat_python_api_infolist_time, METH_VARARGS, "" },
- { "infolist_free", &weechat_python_api_infolist_free, METH_VARARGS, "" },
- { "hdata_get", &weechat_python_api_hdata_get, METH_VARARGS, "" },
- { "hdata_get_var_offset", &weechat_python_api_hdata_get_var_offset, METH_VARARGS, "" },
- { "hdata_get_var_type_string", &weechat_python_api_hdata_get_var_type_string, METH_VARARGS, "" },
- { "hdata_get_var_hdata", &weechat_python_api_hdata_get_var_hdata, METH_VARARGS, "" },
- { "hdata_get_list", &weechat_python_api_hdata_get_list, METH_VARARGS, "" },
- { "hdata_check_pointer", &weechat_python_api_hdata_check_pointer, METH_VARARGS, "" },
- { "hdata_move", &weechat_python_api_hdata_move, METH_VARARGS, "" },
- { "hdata_char", &weechat_python_api_hdata_char, METH_VARARGS, "" },
- { "hdata_integer", &weechat_python_api_hdata_integer, METH_VARARGS, "" },
- { "hdata_long", &weechat_python_api_hdata_long, METH_VARARGS, "" },
- { "hdata_string", &weechat_python_api_hdata_string, METH_VARARGS, "" },
- { "hdata_pointer", &weechat_python_api_hdata_pointer, METH_VARARGS, "" },
- { "hdata_time", &weechat_python_api_hdata_time, METH_VARARGS, "" },
- { "hdata_get_string", &weechat_python_api_hdata_get_string, METH_VARARGS, "" },
- { "upgrade_new", &weechat_python_api_upgrade_new, METH_VARARGS, "" },
- { "upgrade_write_object", &weechat_python_api_upgrade_write_object, METH_VARARGS, "" },
- { "upgrade_read", &weechat_python_api_upgrade_read, METH_VARARGS, "" },
- { "upgrade_close", &weechat_python_api_upgrade_close, METH_VARARGS, "" },
+ API_DEF_FUNC(register),
+ API_DEF_FUNC(plugin_get_name),
+ API_DEF_FUNC(charset_set),
+ API_DEF_FUNC(iconv_to_internal),
+ API_DEF_FUNC(iconv_from_internal),
+ API_DEF_FUNC(gettext),
+ API_DEF_FUNC(ngettext),
+ API_DEF_FUNC(string_match),
+ API_DEF_FUNC(string_has_highlight),
+ API_DEF_FUNC(string_has_highlight_regex),
+ API_DEF_FUNC(string_mask_to_regex),
+ API_DEF_FUNC(string_remove_color),
+ API_DEF_FUNC(string_is_command_char),
+ API_DEF_FUNC(string_input_for_buffer),
+ API_DEF_FUNC(mkdir_home),
+ API_DEF_FUNC(mkdir),
+ API_DEF_FUNC(mkdir_parents),
+ API_DEF_FUNC(list_new),
+ API_DEF_FUNC(list_add),
+ API_DEF_FUNC(list_search),
+ API_DEF_FUNC(list_search_pos),
+ API_DEF_FUNC(list_casesearch),
+ API_DEF_FUNC(list_casesearch_pos),
+ API_DEF_FUNC(list_get),
+ API_DEF_FUNC(list_set),
+ API_DEF_FUNC(list_next),
+ API_DEF_FUNC(list_prev),
+ API_DEF_FUNC(list_string),
+ API_DEF_FUNC(list_size),
+ API_DEF_FUNC(list_remove),
+ API_DEF_FUNC(list_remove_all),
+ API_DEF_FUNC(list_free),
+ API_DEF_FUNC(config_new),
+ API_DEF_FUNC(config_new_section),
+ API_DEF_FUNC(config_search_section),
+ API_DEF_FUNC(config_new_option),
+ API_DEF_FUNC(config_search_option),
+ API_DEF_FUNC(config_string_to_boolean),
+ API_DEF_FUNC(config_option_reset),
+ API_DEF_FUNC(config_option_set),
+ API_DEF_FUNC(config_option_set_null),
+ API_DEF_FUNC(config_option_unset),
+ API_DEF_FUNC(config_option_rename),
+ API_DEF_FUNC(config_option_is_null),
+ API_DEF_FUNC(config_option_default_is_null),
+ API_DEF_FUNC(config_boolean),
+ API_DEF_FUNC(config_boolean_default),
+ API_DEF_FUNC(config_integer),
+ API_DEF_FUNC(config_integer_default),
+ API_DEF_FUNC(config_string),
+ API_DEF_FUNC(config_string_default),
+ API_DEF_FUNC(config_color),
+ API_DEF_FUNC(config_color_default),
+ API_DEF_FUNC(config_write_option),
+ API_DEF_FUNC(config_write_line),
+ API_DEF_FUNC(config_write),
+ API_DEF_FUNC(config_read),
+ API_DEF_FUNC(config_reload),
+ API_DEF_FUNC(config_option_free),
+ API_DEF_FUNC(config_section_free_options),
+ API_DEF_FUNC(config_section_free),
+ API_DEF_FUNC(config_free),
+ API_DEF_FUNC(config_get),
+ API_DEF_FUNC(config_get_plugin),
+ API_DEF_FUNC(config_is_set_plugin),
+ API_DEF_FUNC(config_set_plugin),
+ API_DEF_FUNC(config_set_desc_plugin),
+ API_DEF_FUNC(config_unset_plugin),
+ API_DEF_FUNC(key_bind),
+ API_DEF_FUNC(key_unbind),
+ API_DEF_FUNC(prefix),
+ API_DEF_FUNC(color),
+ API_DEF_FUNC(prnt),
+ API_DEF_FUNC(prnt_date_tags),
+ API_DEF_FUNC(prnt_y),
+ API_DEF_FUNC(log_print),
+ API_DEF_FUNC(hook_command),
+ API_DEF_FUNC(hook_command_run),
+ API_DEF_FUNC(hook_timer),
+ API_DEF_FUNC(hook_fd),
+ API_DEF_FUNC(hook_process),
+ API_DEF_FUNC(hook_connect),
+ API_DEF_FUNC(hook_print),
+ API_DEF_FUNC(hook_signal),
+ API_DEF_FUNC(hook_signal_send),
+ API_DEF_FUNC(hook_hsignal),
+ API_DEF_FUNC(hook_hsignal_send),
+ API_DEF_FUNC(hook_config),
+ API_DEF_FUNC(hook_completion),
+ API_DEF_FUNC(hook_completion_list_add),
+ API_DEF_FUNC(hook_modifier),
+ API_DEF_FUNC(hook_modifier_exec),
+ API_DEF_FUNC(hook_info),
+ API_DEF_FUNC(hook_info_hashtable),
+ API_DEF_FUNC(hook_infolist),
+ API_DEF_FUNC(hook_focus),
+ API_DEF_FUNC(unhook),
+ API_DEF_FUNC(unhook_all),
+ API_DEF_FUNC(buffer_new),
+ API_DEF_FUNC(buffer_search),
+ API_DEF_FUNC(buffer_search_main),
+ API_DEF_FUNC(current_buffer),
+ API_DEF_FUNC(buffer_clear),
+ API_DEF_FUNC(buffer_close),
+ API_DEF_FUNC(buffer_merge),
+ API_DEF_FUNC(buffer_unmerge),
+ API_DEF_FUNC(buffer_get_integer),
+ API_DEF_FUNC(buffer_get_string),
+ API_DEF_FUNC(buffer_get_pointer),
+ API_DEF_FUNC(buffer_set),
+ API_DEF_FUNC(buffer_string_replace_local_var),
+ API_DEF_FUNC(buffer_match_list),
+ API_DEF_FUNC(current_window),
+ API_DEF_FUNC(window_search_with_buffer),
+ API_DEF_FUNC(window_get_integer),
+ API_DEF_FUNC(window_get_string),
+ API_DEF_FUNC(window_get_pointer),
+ API_DEF_FUNC(window_set_title),
+ API_DEF_FUNC(nicklist_add_group),
+ API_DEF_FUNC(nicklist_search_group),
+ API_DEF_FUNC(nicklist_add_nick),
+ API_DEF_FUNC(nicklist_search_nick),
+ API_DEF_FUNC(nicklist_remove_group),
+ API_DEF_FUNC(nicklist_remove_nick),
+ API_DEF_FUNC(nicklist_remove_all),
+ API_DEF_FUNC(nicklist_group_get_integer),
+ API_DEF_FUNC(nicklist_group_get_string),
+ API_DEF_FUNC(nicklist_group_get_pointer),
+ API_DEF_FUNC(nicklist_group_set),
+ API_DEF_FUNC(nicklist_nick_get_integer),
+ API_DEF_FUNC(nicklist_nick_get_string),
+ API_DEF_FUNC(nicklist_nick_get_pointer),
+ API_DEF_FUNC(nicklist_nick_set),
+ API_DEF_FUNC(bar_item_search),
+ API_DEF_FUNC(bar_item_new),
+ API_DEF_FUNC(bar_item_update),
+ API_DEF_FUNC(bar_item_remove),
+ API_DEF_FUNC(bar_search),
+ API_DEF_FUNC(bar_new),
+ API_DEF_FUNC(bar_set),
+ API_DEF_FUNC(bar_update),
+ API_DEF_FUNC(bar_remove),
+ API_DEF_FUNC(command),
+ API_DEF_FUNC(info_get),
+ API_DEF_FUNC(info_get_hashtable),
+ API_DEF_FUNC(infolist_new),
+ API_DEF_FUNC(infolist_new_item),
+ API_DEF_FUNC(infolist_new_var_integer),
+ API_DEF_FUNC(infolist_new_var_string),
+ API_DEF_FUNC(infolist_new_var_pointer),
+ API_DEF_FUNC(infolist_new_var_time),
+ API_DEF_FUNC(infolist_get),
+ API_DEF_FUNC(infolist_next),
+ API_DEF_FUNC(infolist_prev),
+ API_DEF_FUNC(infolist_reset_item_cursor),
+ API_DEF_FUNC(infolist_fields),
+ API_DEF_FUNC(infolist_integer),
+ API_DEF_FUNC(infolist_string),
+ API_DEF_FUNC(infolist_pointer),
+ API_DEF_FUNC(infolist_time),
+ API_DEF_FUNC(infolist_free),
+ API_DEF_FUNC(hdata_get),
+ API_DEF_FUNC(hdata_get_var_offset),
+ API_DEF_FUNC(hdata_get_var_type_string),
+ API_DEF_FUNC(hdata_get_var_hdata),
+ API_DEF_FUNC(hdata_get_list),
+ API_DEF_FUNC(hdata_check_pointer),
+ API_DEF_FUNC(hdata_move),
+ API_DEF_FUNC(hdata_char),
+ API_DEF_FUNC(hdata_integer),
+ API_DEF_FUNC(hdata_long),
+ API_DEF_FUNC(hdata_string),
+ API_DEF_FUNC(hdata_pointer),
+ API_DEF_FUNC(hdata_time),
+ API_DEF_FUNC(hdata_hashtable),
+ API_DEF_FUNC(hdata_get_string),
+ API_DEF_FUNC(upgrade_new),
+ API_DEF_FUNC(upgrade_write_object),
+ API_DEF_FUNC(upgrade_read),
+ API_DEF_FUNC(upgrade_close),
{ NULL, NULL, 0, NULL }
};
diff --git a/src/plugins/scripts/python/weechat-python.c b/src/plugins/scripts/python/weechat-python.c
index f9f134417..db09cc371 100644
--- a/src/plugins/scripts/python/weechat-python.c
+++ b/src/plugins/scripts/python/weechat-python.c
@@ -127,8 +127,8 @@ weechat_python_set_python2_bin ()
void
weechat_python_hashtable_map_cb (void *data,
struct t_hashtable *hashtable,
- const void *key,
- const void *value)
+ const char *key,
+ const char *value)
{
PyObject *dict, *dict_key, *dict_value;
@@ -137,8 +137,8 @@ weechat_python_hashtable_map_cb (void *data,
dict = (PyObject *)data;
- dict_key = Py_BuildValue ("s", (const char *)key);
- dict_value = Py_BuildValue ("s", (const char *)value);
+ dict_key = Py_BuildValue ("s", key);
+ dict_value = Py_BuildValue ("s", value);
PyDict_SetItem (dict, dict_key, dict_value);
@@ -163,9 +163,9 @@ weechat_python_hashtable_to_dict (struct t_hashtable *hashtable)
return Py_None;
}
- weechat_hashtable_map (hashtable,
- &weechat_python_hashtable_map_cb,
- dict);
+ weechat_hashtable_map_string (hashtable,
+ &weechat_python_hashtable_map_cb,
+ dict);
return dict;
}