diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2014-01-11 09:12:04 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2014-01-11 09:12:04 +0100 |
commit | 48837c35bc24cbab1bd518e260b0173d0ae787e1 (patch) | |
tree | 86bb90cf5ff895e1083562d88d4a90d8ee556f2f /src/plugins/perl | |
parent | e5b0b827ef230044eb039c9ce58f41515b03f0e0 (diff) | |
download | weechat-48837c35bc24cbab1bd518e260b0173d0ae787e1.zip |
api: add stdin options in functions hook_process_hashtable and hook_set (task #10847, task #13031)
The function hook_set has been added in script API.
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 7d6c9d668..632e17872 100644 --- a/src/plugins/perl/weechat-perl-api.c +++ b/src/plugins/perl/weechat-perl-api.c @@ -3019,6 +3019,24 @@ XS (XS_weechat_api_hook_focus) API_RETURN_STRING_FREE(result); } +XS (XS_weechat_api_hook_set) +{ + char *hook, *property, *value; + dXSARGS; + + API_FUNC(1, "hook_set", API_RETURN_ERROR); + if (items < 3) + API_WRONG_ARGS(API_RETURN_ERROR); + + hook = SvPV_nolen (ST (0)); + property = SvPV_nolen (ST (1)); + value = SvPV_nolen (ST (2)); + + weechat_hook_set (API_STR2PTR(hook), property, value); + + API_RETURN_OK; +} + XS (XS_weechat_api_unhook) { dXSARGS; @@ -4963,6 +4981,7 @@ weechat_perl_api_init (pTHX) API_DEF_FUNC(hook_info_hashtable); API_DEF_FUNC(hook_infolist); API_DEF_FUNC(hook_focus); + API_DEF_FUNC(hook_set); API_DEF_FUNC(unhook); API_DEF_FUNC(unhook_all); API_DEF_FUNC(buffer_new); |