core: add missing comments before functions when the result must be freed after use

v2.8-utf8proc
Sébastien Helleu 2015-07-04 08:24:53 +02:00
parent 0770b95266
commit bd850398e8
20 changed files with 62 additions and 27 deletions

View File

@ -398,6 +398,8 @@ config_file_search_section (struct t_config_file *config_file,
/*
* Builds full name for an option, using format: "file.section.option".
*
* Note: result must be freed after use.
*/
char *

View File

@ -239,6 +239,8 @@ end:
* or hdata[ptr].var1.var2)
*
* See /help in WeeChat for examples.
*
* Note: result must be freed after use.
*/
char *

View File

@ -2722,6 +2722,8 @@ hook_modifier (struct t_weechat_plugin *plugin, const char *modifier,
/*
* Executes a modifier hook.
*
* Note: result must be freed after use.
*/
char *

View File

@ -611,6 +611,8 @@ secure_get_passphrase_from_user (const char *error)
*
* Returns passphrase read in file (only the first line with max length of
* 1024 chars), or NULL if error.
*
* Note: result must be freed after use.
*/
char *

View File

@ -68,6 +68,8 @@ struct t_hashtable *string_hashtable_shared = NULL;
/*
* Defines a "strndup" function for systems where this function does not exist
* (FreeBSD and maybe others).
*
* Note: result must be freed after use.
*/
char *
@ -1797,7 +1799,7 @@ string_split_shared (const char *string, const char *separators, int keep_eol,
* Posix compliance, split(), string arguments, and
* iterator interface by Gustavo Niemeyer, April 2003.
*
* Note: result must be freed with string_free_split.
* Note: result must be freed after use with function string_free_split().
*/
char **
@ -2059,7 +2061,8 @@ string_build_with_split_string (const char **split_string,
* Splits a list of commands separated by 'separator' and escaped with '\'.
* Empty commands are removed, spaces on the left of each commands are stripped.
*
* Note: result must be freed with free_multi_command.
* Note: result must be freed after use with function
* string_free_split_command().
*/
char **

View File

@ -1879,6 +1879,8 @@ gui_chat_draw_free_buffer (struct t_gui_window *window, int clear_chat)
/*
* Gets line content in bare display.
*
* Note: result must be freed after use.
*/
char *

View File

@ -365,6 +365,8 @@ gui_bar_item_get_vars (const char *item_name,
* For example: if item == "[time]"
* returns: color(delimiter) + "[" +
* (value of item "time") + color(delimiter) + "]"
*
* Note: result must be freed after use.
*/
char *

View File

@ -667,8 +667,10 @@ gui_bar_window_content_get (struct t_gui_bar_window *bar_window,
}
/*
* Gets content of a bar window, formatted for display, according to filling for
* bar position.
* Gets content of a bar window, formatted for display, according to filling
* for bar position.
*
* Note: result must be freed after use.
*/
char *

View File

@ -548,6 +548,8 @@ gui_chat_change_time_format ()
/*
* Builds a string with prefix and message.
*
* Note: result must be freed after use.
*/
char *
@ -590,6 +592,8 @@ gui_chat_build_string_prefix_message (struct t_gui_line *line)
/*
* Builds a string with message and tags.
*
* Note: result must be freed after use.
*/

View File

@ -177,6 +177,8 @@ alias_string_add_arguments (char **alias, int *length, char **argv, int start,
* $n-m arguments from n to m
* $* all arguments
* $~ last argument
*
* Note: result must be freed after use.
*/
char *

View File

@ -497,7 +497,7 @@ weechat_aspell_check_word (struct t_aspell_speller_buffer *speller_buffer,
*
* Returns a string with format: "suggest1,suggest2,suggest3".
*
* Note: result (if not NULL) must be freed after use.
* Note: result must be freed after use (if not NULL).
*/
char *

View File

@ -319,6 +319,8 @@ irc_ctcp_reply_to_nick (struct t_irc_server *server,
/*
* Replaces variables in CTCP format.
*
* Note: result must be freed after use.
*/
char *
@ -497,6 +499,8 @@ irc_ctcp_replace_variables (struct t_irc_server *server, const char *format)
/*
* Returns filename for DCC, without double quotes.
*
* Note: result must be freed after use.
*/
char *

View File

@ -349,6 +349,8 @@ irc_message_parse_to_hashtable (struct t_irc_server *server,
/*
* Encodes/decodes an IRC message using a charset.
*
* Note: result must be freed after use.
*/
char *

View File

@ -95,6 +95,8 @@ irc_nick_is_nick (const char *string)
/*
* Duplicates a nick and stops at first char in list (using option
* irc.look.nick_color_stop_chars).
*
* Note: result must be freed after use.
*/
char *

View File

@ -58,7 +58,7 @@ logger_tail_last_eol (const char *string_start, const char *string_ptr)
/*
* Returns last lines of a file.
*
* Note: result must be freed with function "logger_tail_free".
* Note: result must be freed after use with function logger_tail_free().
*/
struct t_logger_line *

View File

@ -65,7 +65,7 @@ struct t_hook *logger_timer = NULL; /* timer to flush log files */
* - "~": user home
* - date/time specifiers (see man strftime)
*
* Note: returned value must freed after use.
* Note: result must be freed after use.
*/
char *
@ -141,7 +141,7 @@ logger_create_directory ()
/*
* Builds full name of buffer.
*
* Note: value must be freed after use.
* Note: result must be freed after use.
*/
char *
@ -390,6 +390,8 @@ end:
/*
* Builds log filename for a buffer.
*
* Note: result must be freed after use.
*/
char *

View File

@ -741,7 +741,7 @@ plugin_api_info_color_rgb2term_cb (void *data, const char *info_name,
/*
* Returns WeeChat infolist "bar".
*
* Note: result must be freed with function "weechat_infolist_free".
* Note: result must be freed after use with function weechat_infolist_free().
*/
struct t_infolist *
@ -797,7 +797,7 @@ plugin_api_infolist_bar_cb (void *data, const char *infolist_name,
/*
* Returns WeeChat infolist "bar_item".
*
* Note: result must be freed with function "weechat_infolist_free".
* Note: result must be freed after use with function weechat_infolist_free().
*/
struct t_infolist *
@ -854,7 +854,7 @@ plugin_api_infolist_bar_item_cb (void *data, const char *infolist_name,
/*
* Returns WeeChat infolist "bar_window".
*
* Note: result must be freed with function "weechat_infolist_free".
* Note: result must be freed after use with function weechat_infolist_free().
*/
struct t_infolist *
@ -926,7 +926,7 @@ plugin_api_infolist_bar_window_cb (void *data, const char *infolist_name,
/*
* Returns WeeChat infolist "buffer".
*
* Note: result must be freed with function "weechat_infolist_free".
* Note: result must be freed after use with function weechat_infolist_free().
*/
struct t_infolist *
@ -983,7 +983,7 @@ plugin_api_infolist_buffer_cb (void *data, const char *infolist_name,
/*
* Returns WeeChat infolist "buffer_lines".
*
* Note: result must be freed with function "weechat_infolist_free".
* Note: result must be freed after use with function weechat_infolist_free().
*/
struct t_infolist *
@ -1028,7 +1028,7 @@ plugin_api_infolist_buffer_lines_cb (void *data, const char *infolist_name,
/*
* Returns WeeChat infolist "filter".
*
* Note: result must be freed with function "weechat_infolist_free".
* Note: result must be freed after use with function weechat_infolist_free().
*/
struct t_infolist *
@ -1066,7 +1066,7 @@ plugin_api_infolist_filter_cb (void *data, const char *infolist_name,
/*
* Returns WeeChat infolist "history".
*
* Note: result must be freed with function "weechat_infolist_free".
* Note: result must be freed after use with function weechat_infolist_free().
*/
struct t_infolist *
@ -1105,7 +1105,7 @@ plugin_api_infolist_history_cb (void *data, const char *infolist_name,
/*
* Returns WeeChat infolist "hook".
*
* Note: result must be freed with function "weechat_infolist_free".
* Note: result must be freed after use with function weechat_infolist_free().
*/
struct t_infolist *
@ -1137,7 +1137,7 @@ plugin_api_infolist_hook_cb (void *data, const char *infolist_name,
/*
* Returns WeeChat infolist "hotlist".
*
* Note: result must be freed with function "weechat_infolist_free".
* Note: result must be freed after use with function weechat_infolist_free().
*/
struct t_infolist *
@ -1172,7 +1172,7 @@ plugin_api_infolist_hotlist_cb (void *data, const char *infolist_name,
/*
* Returns WeeChat infolist "key".
*
* Note: result must be freed with function "weechat_infolist_free".
* Note: result must be freed after use with function weechat_infolist_free().
*/
struct t_infolist *
@ -1214,7 +1214,7 @@ plugin_api_infolist_key_cb (void *data, const char *infolist_name,
/*
* Returns WeeChat infolist "layout".
*
* Note: result must be freed with function "weechat_infolist_free".
* Note: result must be freed after use with function weechat_infolist_free().
*/
struct t_infolist *
@ -1249,7 +1249,7 @@ plugin_api_infolist_layout_cb (void *data, const char *infolist_name,
/*
* Returns WeeChat infolist "nicklist".
*
* Note: result must be freed with function "weechat_infolist_free".
* Note: result must be freed after use with function weechat_infolist_free().
*/
struct t_infolist *
@ -1281,7 +1281,7 @@ plugin_api_infolist_nicklist_cb (void *data, const char *infolist_name,
/*
* Returns WeeChat infolist "option".
*
* Note: result must be freed with function "weechat_infolist_free".
* Note: result must be freed after use with function weechat_infolist_free().
*/
struct t_infolist *
@ -1310,7 +1310,7 @@ plugin_api_infolist_option_cb (void *data, const char *infolist_name,
/*
* Returns WeeChat infolist "plugin".
*
* Note: result must be freed with function "weechat_infolist_free".
* Note: result must be freed after use with function weechat_infolist_free().
*/
struct t_infolist *
@ -1367,7 +1367,7 @@ plugin_api_infolist_plugin_cb (void *data, const char *infolist_name,
/*
* Returns WeeChat infolist "proxy".
*
* Note: result must be freed with function "weechat_infolist_free".
* Note: result must be freed after use with function weechat_infolist_free().
*/
struct t_infolist *
@ -1424,7 +1424,7 @@ plugin_api_infolist_proxy_cb (void *data, const char *infolist_name,
/*
* Returns WeeChat infolist "url_options".
*
* Note: result must be freed with function "weechat_infolist_free".
* Note: result must be freed after use with function weechat_infolist_free().
*/
struct t_infolist *
@ -1458,7 +1458,7 @@ plugin_api_infolist_url_options_cb (void *data, const char *infolist_name,
/*
* Returns WeeChat infolist "window".
*
* Note: result must be freed with function "weechat_infolist_free".
* Note: result must be freed after use with function weechat_infolist_free().
*/
struct t_infolist *

View File

@ -411,6 +411,8 @@ plugin_script_search_by_full_name (struct t_plugin_script *scripts,
/*
* Searches for path name of a script.
*
* Note: result must be freed after use.
*/
char *

View File

@ -285,7 +285,7 @@ plugin_check_autoload (const char *filename)
* Returns arguments for plugins (only the relevant arguments for plugins,
* arguments for WeeChat core not returned).
*
* Note: plugin_argv must be freed after use (with free()).
* Note: plugin_argv must be freed after use.
*/
void

View File

@ -42,7 +42,7 @@ struct t_hashtable *trigger_callback_hashtable_options_regex = NULL;
*
* Returns a hashtable with the parsed message, or NULL if error.
*
* Note: the hashtable must be freed after use.
* Note: hashtable must be freed after use.
*/
struct t_hashtable *