If hashmap creation fails (eg. not enough memory), it jumps to the label
"end", where it checks the pointer tags, that hadn't been initialized
before.
The simple fix is to initialize it before creating the hashmap.
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
For modifier "weechat_print", variables added:
- tg_string_nocolor (same as tg_string, without colors)
- tg_prefix_nocolor (same as tg_prefix, without colors)
- tg_message_nocolor (same as tg_message, without colors)
For hook print, variables added:
- tg_prefix_nocolor (same as tg_prefix, without colors)
- tg_message_nocolor (same as tg_message, without colors)
The parsed message is added into hashtable "extra_vars".
For example, signal "freenode,irc_in_PRIVMSG" received with the message
"hello world!" on channel #weechat gives in the hashtable:
extra_vars:
tags: ""
host: "tester!user@host.com"
tg_signal: "freenode,irc_in_PRIVMSG"
channel: "#weechat"
tg_signal_data: ":tester!user@host.com PRIVMSG #weechat :hello world!"
arguments: "#weechat :hello world!"
nick: "tester"
command: "PRIVMSG"
message_without_tags: ":tester!user@host.com PRIVMSG #weechat :hello world!"
The reference char is now an argument for the function.
The references are now $0 .. $99 and $+ was added (last match, with
highest number).
The syntax to replace a match with one char is now: $.cN or $.c+
(for example: "$.*3").