1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-25 04:16:38 +02:00

api: add missing function hook_completion_get_string() in script API (issue #484)

This commit is contained in:
Sébastien Helleu
2015-08-13 20:45:33 +02:00
parent 6b75516702
commit 7033fdd0cb
8 changed files with 137 additions and 0 deletions
+17
View File
@@ -2665,6 +2665,22 @@ API_FUNC(hook_completion)
API_RETURN_STRING_FREE(result);
}
API_FUNC(hook_completion_get_string)
{
const char *result;
API_INIT_FUNC(1, "hook_completion_get_string", "ss", API_RETURN_EMPTY);
v8::String::Utf8Value completion(args[0]);
v8::String::Utf8Value property(args[1]);
result = weechat_hook_completion_get_string (
(struct t_gui_completion *)API_STR2PTR(*completion),
*property);
API_RETURN_STRING(result);
}
API_FUNC(hook_completion_list_add)
{
int nick_completion;
@@ -4792,6 +4808,7 @@ WeechatJsV8::loadLibs()
API_DEF_FUNC(hook_hsignal_send);
API_DEF_FUNC(hook_config);
API_DEF_FUNC(hook_completion);
API_DEF_FUNC(hook_completion_get_string);
API_DEF_FUNC(hook_completion_list_add);
API_DEF_FUNC(hook_modifier);
API_DEF_FUNC(hook_modifier_exec);