diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2019-04-12 21:29:39 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2019-04-13 08:42:45 +0200 |
commit | 3d95217745cd269e6911a0830f7e6cc515828f07 (patch) | |
tree | 7cc372d8874c2d994c444199360c040778c3e153 /src/core/hook/wee-hook-info.c | |
parent | c80dc2a5ca93045ed7c358a8860532aab72f0c89 (diff) | |
download | weechat-3d95217745cd269e6911a0830f7e6cc515828f07.zip |
api: return allocated string in hook_info callback and function info_get
Diffstat (limited to 'src/core/hook/wee-hook-info.c')
-rw-r--r-- | src/core/hook/wee-hook-info.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/hook/wee-hook-info.c b/src/core/hook/wee-hook-info.c index 36d866c60..33aeb5694 100644 --- a/src/core/hook/wee-hook-info.c +++ b/src/core/hook/wee-hook-info.c @@ -83,14 +83,16 @@ hook_info (struct t_weechat_plugin *plugin, const char *info_name, /* * Gets info (as string) via info hook. + * + * Note: result must be freed after use. */ -const char * +char * hook_info_get (struct t_weechat_plugin *plugin, const char *info_name, const char *arguments) { struct t_hook *ptr_hook, *next_hook; - const char *value; + char *value; /* make C compiler happy */ (void) plugin; |