diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2015-08-13 20:45:33 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2015-08-13 20:45:33 +0200 |
commit | 7033fdd0cbb5e066f5e5e9a1d6784196b5211fae (patch) | |
tree | 3f8ab24d76cad91ffd9df732b5141d27220fe1f5 /src/plugins/perl | |
parent | 6b75516702cc849d30459d511142c1b7dadf0266 (diff) | |
download | weechat-7033fdd0cbb5e066f5e5e9a1d6784196b5211fae.zip |
api: add missing function hook_completion_get_string() in script API (issue #484)
Diffstat (limited to 'src/plugins/perl')
-rw-r--r-- | src/plugins/perl/weechat-perl-api.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/plugins/perl/weechat-perl-api.c b/src/plugins/perl/weechat-perl-api.c index dddcb9500..e88d1108a 100644 --- a/src/plugins/perl/weechat-perl-api.c +++ b/src/plugins/perl/weechat-perl-api.c @@ -2756,6 +2756,25 @@ API_FUNC(hook_completion) API_RETURN_STRING_FREE(result); } +API_FUNC(hook_completion_get_string) +{ + char *completion, *property; + const char *result; + dXSARGS; + + API_INIT_FUNC(1, "hook_completion_get_string", API_RETURN_EMPTY); + if (items < 2) + API_WRONG_ARGS(API_RETURN_EMPTY); + + completion = SvPV_nolen (ST (0)); + property = SvPV_nolen (ST (1)); + + result = weechat_hook_completion_get_string (API_STR2PTR(completion), + property); + + API_RETURN_STRING(result); +} + API_FUNC(hook_completion_list_add) { char *completion, *word, *where; @@ -5013,6 +5032,7 @@ weechat_perl_api_init (pTHX) 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); |