diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2016-03-21 18:11:21 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2016-03-21 18:11:21 +0100 |
commit | cf6aca1619c32422a43fa3d82e0674f6b7b49fe9 (patch) | |
tree | 65392ef12eab877f544fe306fe0abb98214ddebd /doc/en/autogen/plugin_api | |
parent | 6d764b64c50adb19309a9de14bfeafac648ab47a (diff) | |
download | weechat-cf6aca1619c32422a43fa3d82e0674f6b7b49fe9.zip |
core: add pointer in some callbacks (closes #406)
This pointer is the first argument received by callbacks, and the
existing argument "data" is now automatically freed by WeeChat when the
object containing the callback is removed.
With this new pointer, the linked list of callbacks in scripts has been
removed. This will improve speed of scripts (using a lot of hooks),
reduce memory used by scripts and reduce time to unload scripts.
Following functions are affected in the C API:
* exec_on_files
* config_new
* config_new_section
* config_new_option
* hook_command
* hook_command_run
* hook_timer
* hook_fd
* hook_process
* hook_process_hashtable
* hook_connect
* hook_print
* hook_signal
* hook_hsignal
* hook_config
* hook_completion
* hook_modifier
* hook_info
* hook_info_hashtable
* hook_infolist
* hook_hdata
* hook_focus
* unhook_all_plugin
* buffer_new
* bar_item_new
* upgrade_new
* upgrade_read
Diffstat (limited to 'doc/en/autogen/plugin_api')
-rw-r--r-- | doc/en/autogen/plugin_api/hdata.asciidoc | 125 |
1 files changed, 13 insertions, 112 deletions
diff --git a/doc/en/autogen/plugin_api/hdata.asciidoc b/doc/en/autogen/plugin_api/hdata.asciidoc index 904f694ee..0850501a6 100644 --- a/doc/en/autogen/plugin_api/hdata.asciidoc +++ b/doc/en/autogen/plugin_api/hdata.asciidoc @@ -2,21 +2,6 @@ // This file is auto-generated by script docgen.py. // DO NOT EDIT BY HAND! // -* [[hdata_guile_callback]]<<hdata_guile_callback,'guile_callback'>>: callback of a script -** plugin: guile -** variables: -*** 'script' (pointer, hdata: "guile_script") -*** 'function' (string) -*** 'data' (string) -*** 'config_file' (pointer, hdata: "config_file") -*** 'config_section' (pointer, hdata: "config_section") -*** 'config_option' (pointer, hdata: "config_option") -*** 'hook' (pointer) -*** 'buffer' (pointer, hdata: "buffer") -*** 'bar_item' (pointer, hdata: "bar_item") -*** 'upgrade_file' (pointer) -*** 'prev_callback' (pointer, hdata: "guile_callback") -*** 'next_callback' (pointer, hdata: "guile_callback") * [[hdata_guile_script]]<<hdata_guile_script,'guile_script'>>: list of scripts ** plugin: guile ** variables: @@ -29,7 +14,6 @@ *** 'description' (string) *** 'shutdown_func' (string) *** 'charset' (string) -*** 'callbacks' (pointer, hdata: "guile_callback") *** 'unloading' (integer) *** 'prev_script' (pointer, hdata: "guile_script") *** 'next_script' (pointer, hdata: "guile_script") @@ -229,21 +213,6 @@ ** lists: *** 'irc_servers' *** 'last_irc_server' -* [[hdata_javascript_callback]]<<hdata_javascript_callback,'javascript_callback'>>: callback of a script -** plugin: javascript -** variables: -*** 'script' (pointer, hdata: "javascript_script") -*** 'function' (string) -*** 'data' (string) -*** 'config_file' (pointer, hdata: "config_file") -*** 'config_section' (pointer, hdata: "config_section") -*** 'config_option' (pointer, hdata: "config_option") -*** 'hook' (pointer) -*** 'buffer' (pointer, hdata: "buffer") -*** 'bar_item' (pointer, hdata: "bar_item") -*** 'upgrade_file' (pointer) -*** 'prev_callback' (pointer, hdata: "javascript_callback") -*** 'next_callback' (pointer, hdata: "javascript_callback") * [[hdata_javascript_script]]<<hdata_javascript_script,'javascript_script'>>: list of scripts ** plugin: javascript ** variables: @@ -256,28 +225,12 @@ *** 'description' (string) *** 'shutdown_func' (string) *** 'charset' (string) -*** 'callbacks' (pointer, hdata: "javascript_callback") *** 'unloading' (integer) *** 'prev_script' (pointer, hdata: "javascript_script") *** 'next_script' (pointer, hdata: "javascript_script") ** lists: *** 'last_script' *** 'scripts' -* [[hdata_lua_callback]]<<hdata_lua_callback,'lua_callback'>>: callback of a script -** plugin: lua -** variables: -*** 'script' (pointer, hdata: "lua_script") -*** 'function' (string) -*** 'data' (string) -*** 'config_file' (pointer, hdata: "config_file") -*** 'config_section' (pointer, hdata: "config_section") -*** 'config_option' (pointer, hdata: "config_option") -*** 'hook' (pointer) -*** 'buffer' (pointer, hdata: "buffer") -*** 'bar_item' (pointer, hdata: "bar_item") -*** 'upgrade_file' (pointer) -*** 'prev_callback' (pointer, hdata: "lua_callback") -*** 'next_callback' (pointer, hdata: "lua_callback") * [[hdata_lua_script]]<<hdata_lua_script,'lua_script'>>: list of scripts ** plugin: lua ** variables: @@ -290,28 +243,12 @@ *** 'description' (string) *** 'shutdown_func' (string) *** 'charset' (string) -*** 'callbacks' (pointer, hdata: "lua_callback") *** 'unloading' (integer) *** 'prev_script' (pointer, hdata: "lua_script") *** 'next_script' (pointer, hdata: "lua_script") ** lists: *** 'last_script' *** 'scripts' -* [[hdata_perl_callback]]<<hdata_perl_callback,'perl_callback'>>: callback of a script -** plugin: perl -** variables: -*** 'script' (pointer, hdata: "perl_script") -*** 'function' (string) -*** 'data' (string) -*** 'config_file' (pointer, hdata: "config_file") -*** 'config_section' (pointer, hdata: "config_section") -*** 'config_option' (pointer, hdata: "config_option") -*** 'hook' (pointer) -*** 'buffer' (pointer, hdata: "buffer") -*** 'bar_item' (pointer, hdata: "bar_item") -*** 'upgrade_file' (pointer) -*** 'prev_callback' (pointer, hdata: "perl_callback") -*** 'next_callback' (pointer, hdata: "perl_callback") * [[hdata_perl_script]]<<hdata_perl_script,'perl_script'>>: list of scripts ** plugin: perl ** variables: @@ -324,28 +261,12 @@ *** 'description' (string) *** 'shutdown_func' (string) *** 'charset' (string) -*** 'callbacks' (pointer, hdata: "perl_callback") *** 'unloading' (integer) *** 'prev_script' (pointer, hdata: "perl_script") *** 'next_script' (pointer, hdata: "perl_script") ** lists: *** 'last_script' *** 'scripts' -* [[hdata_python_callback]]<<hdata_python_callback,'python_callback'>>: callback of a script -** plugin: python -** variables: -*** 'script' (pointer, hdata: "python_script") -*** 'function' (string) -*** 'data' (string) -*** 'config_file' (pointer, hdata: "config_file") -*** 'config_section' (pointer, hdata: "config_section") -*** 'config_option' (pointer, hdata: "config_option") -*** 'hook' (pointer) -*** 'buffer' (pointer, hdata: "buffer") -*** 'bar_item' (pointer, hdata: "bar_item") -*** 'upgrade_file' (pointer) -*** 'prev_callback' (pointer, hdata: "python_callback") -*** 'next_callback' (pointer, hdata: "python_callback") * [[hdata_python_script]]<<hdata_python_script,'python_script'>>: list of scripts ** plugin: python ** variables: @@ -358,28 +279,12 @@ *** 'description' (string) *** 'shutdown_func' (string) *** 'charset' (string) -*** 'callbacks' (pointer, hdata: "python_callback") *** 'unloading' (integer) *** 'prev_script' (pointer, hdata: "python_script") *** 'next_script' (pointer, hdata: "python_script") ** lists: *** 'last_script' *** 'scripts' -* [[hdata_ruby_callback]]<<hdata_ruby_callback,'ruby_callback'>>: callback of a script -** plugin: ruby -** variables: -*** 'script' (pointer, hdata: "ruby_script") -*** 'function' (string) -*** 'data' (string) -*** 'config_file' (pointer, hdata: "config_file") -*** 'config_section' (pointer, hdata: "config_section") -*** 'config_option' (pointer, hdata: "config_option") -*** 'hook' (pointer) -*** 'buffer' (pointer, hdata: "buffer") -*** 'bar_item' (pointer, hdata: "bar_item") -*** 'upgrade_file' (pointer) -*** 'prev_callback' (pointer, hdata: "ruby_callback") -*** 'next_callback' (pointer, hdata: "ruby_callback") * [[hdata_ruby_script]]<<hdata_ruby_script,'ruby_script'>>: list of scripts ** plugin: ruby ** variables: @@ -392,7 +297,6 @@ *** 'description' (string) *** 'shutdown_func' (string) *** 'charset' (string) -*** 'callbacks' (pointer, hdata: "ruby_callback") *** 'unloading' (integer) *** 'prev_script' (pointer, hdata: "ruby_script") *** 'next_script' (pointer, hdata: "ruby_script") @@ -428,21 +332,6 @@ ** lists: *** 'last_script_repo' *** 'scripts_repo' -* [[hdata_tcl_callback]]<<hdata_tcl_callback,'tcl_callback'>>: callback of a script -** plugin: tcl -** variables: -*** 'script' (pointer, hdata: "tcl_script") -*** 'function' (string) -*** 'data' (string) -*** 'config_file' (pointer, hdata: "config_file") -*** 'config_section' (pointer, hdata: "config_section") -*** 'config_option' (pointer, hdata: "config_option") -*** 'hook' (pointer) -*** 'buffer' (pointer, hdata: "buffer") -*** 'bar_item' (pointer, hdata: "bar_item") -*** 'upgrade_file' (pointer) -*** 'prev_callback' (pointer, hdata: "tcl_callback") -*** 'next_callback' (pointer, hdata: "tcl_callback") * [[hdata_tcl_script]]<<hdata_tcl_script,'tcl_script'>>: list of scripts ** plugin: tcl ** variables: @@ -455,7 +344,6 @@ *** 'description' (string) *** 'shutdown_func' (string) *** 'charset' (string) -*** 'callbacks' (pointer, hdata: "tcl_callback") *** 'unloading' (integer) *** 'prev_script' (pointer, hdata: "tcl_script") *** 'next_script' (pointer, hdata: "tcl_script") @@ -487,6 +375,7 @@ *** 'plugin' (pointer, hdata: "plugin") *** 'name' (string) *** 'build_callback' (pointer) +*** 'build_callback_pointer' (pointer) *** 'build_callback_data' (pointer) *** 'prev_item' (pointer, hdata: "bar_item") *** 'next_item' (pointer, hdata: "bar_item") @@ -540,6 +429,7 @@ *** 'clear' (integer) *** 'filter' (integer) *** 'close_callback' (pointer) +*** 'close_callback_pointer' (pointer) *** 'close_callback_data' (pointer) *** 'closing' (integer) *** 'title' (string) @@ -558,9 +448,11 @@ *** 'nicklist_nicks_count' (integer) *** 'nicklist_visible_count' (integer) *** 'nickcmp_callback' (pointer) +*** 'nickcmp_callback_pointer' (pointer) *** 'nickcmp_callback_data' (pointer) *** 'input' (integer) *** 'input_callback' (pointer) +*** 'input_callback_pointer' (pointer) *** 'input_callback_data' (pointer) *** 'input_get_unknown_commands' (integer) *** 'input_buffer' (string) @@ -644,6 +536,7 @@ *** 'filename' (string) *** 'file' (pointer) *** 'callback_reload' (pointer) +*** 'callback_reload_pointer' (pointer) *** 'callback_reload_data' (pointer) *** 'sections' (pointer, hdata: "config_section") *** 'last_section' (pointer, hdata: "config_section") @@ -668,10 +561,13 @@ *** 'value' (pointer) *** 'null_value_allowed' (integer) *** 'callback_check_value' (pointer) +*** 'callback_check_value_pointer' (pointer) *** 'callback_check_value_data' (pointer) *** 'callback_change' (pointer) +*** 'callback_change_pointer' (pointer) *** 'callback_change_data' (pointer) *** 'callback_delete' (pointer) +*** 'callback_delete_pointer' (pointer) *** 'callback_delete_data' (pointer) *** 'loaded' (integer) *** 'prev_option' (pointer, hdata: "config_option") @@ -684,14 +580,19 @@ *** 'user_can_add_options' (integer) *** 'user_can_delete_options' (integer) *** 'callback_read' (pointer) +*** 'callback_read_pointer' (pointer) *** 'callback_read_data' (pointer) *** 'callback_write' (pointer) +*** 'callback_write_pointer' (pointer) *** 'callback_write_data' (pointer) *** 'callback_write_default' (pointer) +*** 'callback_write_default_pointer' (pointer) *** 'callback_write_default_data' (pointer) *** 'callback_create_option' (pointer) +*** 'callback_create_option_pointer' (pointer) *** 'callback_create_option_data' (pointer) *** 'callback_delete_option' (pointer) +*** 'callback_delete_option_pointer' (pointer) *** 'callback_delete_option_data' (pointer) *** 'options' (pointer, hdata: "config_option") *** 'last_option' (pointer, hdata: "config_option") |