mirror of
https://github.com/weechat/weechat.git
synced 2026-06-27 13:26:38 +02:00
api: add missing function hook_completion_get_string() in script API (issue #484)
This commit is contained in:
@@ -2837,6 +2837,23 @@ API_FUNC(hook_completion)
|
||||
API_RETURN_STRING_FREE(result);
|
||||
}
|
||||
|
||||
API_FUNC(hook_completion_get_string)
|
||||
{
|
||||
const char *completion, *property, *result;
|
||||
|
||||
API_INIT_FUNC(1, "hook_completion_get_string", API_RETURN_EMPTY);
|
||||
if (lua_gettop (L) < 2)
|
||||
API_WRONG_ARGS(API_RETURN_EMPTY);
|
||||
|
||||
completion = lua_tostring (L, -2);
|
||||
property = lua_tostring (L, -1);
|
||||
|
||||
result = weechat_hook_completion_get_string (API_STR2PTR(completion),
|
||||
property);
|
||||
|
||||
API_RETURN_STRING(result);
|
||||
}
|
||||
|
||||
API_FUNC(hook_completion_list_add)
|
||||
{
|
||||
const char *completion, *word, *where;
|
||||
@@ -5071,6 +5088,7 @@ const struct luaL_Reg weechat_lua_api_funcs[] = {
|
||||
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),
|
||||
|
||||
Reference in New Issue
Block a user