diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2010-09-21 17:31:27 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2010-09-21 17:31:27 +0200 |
commit | 86323231fd321da02fa6ed5864cca2816d5bffeb (patch) | |
tree | 92fbc576543089914efb4b19afca1dee2d64cfd2 /src/plugins/scripts/perl/weechat-perl-api.c | |
parent | 051788f7317487a6ca752f143d8a7270f693acd5 (diff) | |
download | weechat-86323231fd321da02fa6ed5864cca2816d5bffeb.zip |
Add missing function "infolist_reset_item_cursor" in script API (bug #31057)
Diffstat (limited to 'src/plugins/scripts/perl/weechat-perl-api.c')
-rw-r--r-- | src/plugins/scripts/perl/weechat-perl-api.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/plugins/scripts/perl/weechat-perl-api.c b/src/plugins/scripts/perl/weechat-perl-api.c index 6d0e8257b..7d5b91e39 100644 --- a/src/plugins/scripts/perl/weechat-perl-api.c +++ b/src/plugins/scripts/perl/weechat-perl-api.c @@ -5693,6 +5693,35 @@ XS (XS_weechat_api_infolist_prev) } /* + * weechat::infolist_reset_item_cursor: reset pointer to current item in + * infolist + */ + +XS (XS_weechat_api_infolist_reset_item_cursor) +{ + dXSARGS; + + /* make C compiler happy */ + (void) cv; + + if (!perl_current_script) + { + WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "infolist_reset_item_cursor"); + PERL_RETURN_ERROR; + } + + if (items < 1) + { + WEECHAT_SCRIPT_MSG_WRONG_ARGS(PERL_CURRENT_SCRIPT_NAME, "infolist_reset_item_cursor"); + PERL_RETURN_ERROR; + } + + weechat_infolist_reset_item_cursor (script_str2ptr (SvPV (ST (0), PL_na))); /* infolist */ + + PERL_RETURN_OK; +} + +/* * weechat::infolist_fields: get list of fields for current item of infolist */ @@ -6215,6 +6244,7 @@ weechat_perl_api_init (pTHX) newXS ("weechat::infolist_get", XS_weechat_api_infolist_get, "weechat"); newXS ("weechat::infolist_next", XS_weechat_api_infolist_next, "weechat"); newXS ("weechat::infolist_prev", XS_weechat_api_infolist_prev, "weechat"); + newXS ("weechat::infolist_reset_item_cursor", XS_weechat_api_infolist_reset_item_cursor, "weechat"); newXS ("weechat::infolist_fields", XS_weechat_api_infolist_fields, "weechat"); newXS ("weechat::infolist_integer", XS_weechat_api_infolist_integer, "weechat"); newXS ("weechat::infolist_string", XS_weechat_api_infolist_string, "weechat"); |