1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-09 11:13:12 +02:00

api: add function completion_set

This commit is contained in:
Sébastien Helleu
2025-02-15 23:22:44 +01:00
parent 1b54cd24ed
commit c7d21a3ea6
25 changed files with 577 additions and 16 deletions
+19
View File
@@ -4733,6 +4733,24 @@ API_FUNC(completion_get_string)
API_RETURN_STRING(result);
}
API_FUNC(completion_set)
{
char *completion, *property, *value;
dXSARGS;
API_INIT_FUNC(1, "completion_set", API_RETURN_ERROR);
if (items < 3)
API_WRONG_ARGS(API_RETURN_ERROR);
completion = SvPV_nolen (ST (0));
property = SvPV_nolen (ST (1));
value = SvPV_nolen (ST (2));
weechat_completion_set (API_STR2PTR(completion), property, value);
API_RETURN_OK;
}
API_FUNC(completion_list_add)
{
char *completion, *word, *where;
@@ -5870,6 +5888,7 @@ weechat_perl_api_init (pTHX)
API_DEF_FUNC(completion_new);
API_DEF_FUNC(completion_search);
API_DEF_FUNC(completion_get_string);
API_DEF_FUNC(completion_set);
API_DEF_FUNC(completion_list_add);
API_DEF_FUNC(completion_free);
API_DEF_FUNC(info_get);