summaryrefslogtreecommitdiff
path: root/src/plugins/guile/weechat-guile-api.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2014-01-11 09:12:04 +0100
committerSebastien Helleu <flashcode@flashtux.org>2014-01-11 09:12:04 +0100
commit48837c35bc24cbab1bd518e260b0173d0ae787e1 (patch)
tree86bb90cf5ff895e1083562d88d4a90d8ee556f2f /src/plugins/guile/weechat-guile-api.c
parente5b0b827ef230044eb039c9ce58f41515b03f0e0 (diff)
downloadweechat-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/guile/weechat-guile-api.c')
-rw-r--r--src/plugins/guile/weechat-guile-api.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/plugins/guile/weechat-guile-api.c b/src/plugins/guile/weechat-guile-api.c
index b79e53967..bdd47e92f 100644
--- a/src/plugins/guile/weechat-guile-api.c
+++ b/src/plugins/guile/weechat-guile-api.c
@@ -2965,6 +2965,21 @@ weechat_guile_api_hook_focus (SCM area, SCM function, SCM data)
}
SCM
+weechat_guile_api_hook_set (SCM hook, SCM property, SCM value)
+{
+ API_FUNC(1, "hook_set", API_RETURN_ERROR);
+ if (!scm_is_string (hook) || !scm_is_string (property)
+ || !scm_is_string (value))
+ API_WRONG_ARGS(API_RETURN_ERROR);
+
+ weechat_hook_set (API_STR2PTR(API_SCM_TO_STRING(hook)),
+ API_SCM_TO_STRING(property),
+ API_SCM_TO_STRING(value));
+
+ API_RETURN_OK;
+}
+
+SCM
weechat_guile_api_unhook (SCM hook)
{
API_FUNC(1, "unhook", API_RETURN_ERROR);
@@ -4726,6 +4741,7 @@ weechat_guile_api_module_init (void *data)
API_DEF_FUNC(hook_info_hashtable, 6);
API_DEF_FUNC(hook_infolist, 6);
API_DEF_FUNC(hook_focus, 3);
+ API_DEF_FUNC(hook_set, 3);
API_DEF_FUNC(unhook, 1);
API_DEF_FUNC(unhook_all, 0);
API_DEF_FUNC(buffer_new, 5);