diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2015-08-13 20:50:15 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2015-08-13 20:50:15 +0200 |
commit | 4716e81d4e0f94cfed9a3e2b4dc103bf4bf83459 (patch) | |
tree | d63fc8c81d11c442bcfcccff1cfac09bafa53d2f /src/plugins/perl | |
parent | 7033fdd0cbb5e066f5e5e9a1d6784196b5211fae (diff) | |
download | weechat-4716e81d4e0f94cfed9a3e2b4dc103bf4bf83459.zip |
api: add missing function infolist_search_var() in script API (issue #484)
Diffstat (limited to 'src/plugins/perl')
-rw-r--r-- | src/plugins/perl/weechat-perl-api.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/plugins/perl/weechat-perl-api.c b/src/plugins/perl/weechat-perl-api.c index e88d1108a..61631c72b 100644 --- a/src/plugins/perl/weechat-perl-api.c +++ b/src/plugins/perl/weechat-perl-api.c @@ -4251,6 +4251,24 @@ API_FUNC(infolist_new_var_time) API_RETURN_STRING_FREE(result); } +API_FUNC(infolist_search_var) +{ + char *infolist, *name, *result; + dXSARGS; + + API_INIT_FUNC(1, "infolist_search_var", API_RETURN_EMPTY); + if (items < 2) + API_WRONG_ARGS(API_RETURN_EMPTY); + + infolist = SvPV_nolen (ST (0)); + name = SvPV_nolen (ST (1)); + + result = API_PTR2STR(weechat_infolist_search_var (API_STR2PTR(infolist), + name)); + + API_RETURN_STRING_FREE(result); +} + API_FUNC(infolist_get) { char *result, *name, *pointer, *arguments; @@ -5096,6 +5114,7 @@ weechat_perl_api_init (pTHX) API_DEF_FUNC(infolist_new_var_string); API_DEF_FUNC(infolist_new_var_pointer); API_DEF_FUNC(infolist_new_var_time); + API_DEF_FUNC(infolist_search_var); API_DEF_FUNC(infolist_get); API_DEF_FUNC(infolist_next); API_DEF_FUNC(infolist_prev); |