summaryrefslogtreecommitdiff
path: root/src/plugins/guile
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2013-04-21 11:26:52 +0200
committerSebastien Helleu <flashcode@flashtux.org>2013-04-21 11:26:52 +0200
commit509a58b1d54420c62b1d9069e91512983f7ca44a (patch)
tree892345b0e8787e2fe8f1d6c45e81ef6079942b78 /src/plugins/guile
parentfcd71d14bc23a908f33224f1de91ab740dd40ff0 (diff)
downloadweechat-509a58b1d54420c62b1d9069e91512983f7ca44a.zip
api: add new function hdata_search
Diffstat (limited to 'src/plugins/guile')
-rw-r--r--src/plugins/guile/weechat-guile-api.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/plugins/guile/weechat-guile-api.c b/src/plugins/guile/weechat-guile-api.c
index b01b31e50..8f6e99873 100644
--- a/src/plugins/guile/weechat-guile-api.c
+++ b/src/plugins/guile/weechat-guile-api.c
@@ -4264,6 +4264,25 @@ weechat_guile_api_hdata_move (SCM hdata, SCM pointer, SCM count)
}
SCM
+weechat_guile_api_hdata_search (SCM hdata, SCM pointer, SCM search, SCM move)
+{
+ char *result;
+ SCM return_value;
+
+ API_FUNC(1, "hdata_search", API_RETURN_EMPTY);
+ if (!scm_is_string (hdata) || !scm_is_string (pointer)
+ || !scm_is_string (search) || !scm_is_integer (move))
+ API_WRONG_ARGS(API_RETURN_EMPTY);
+
+ result = API_PTR2STR(weechat_hdata_search (API_STR2PTR(API_SCM_TO_STRING(hdata)),
+ API_STR2PTR(API_SCM_TO_STRING(pointer)),
+ API_SCM_TO_STRING(search),
+ scm_to_int (move)));
+
+ API_RETURN_STRING_FREE(result);
+}
+
+SCM
weechat_guile_api_hdata_char (SCM hdata, SCM pointer, SCM name)
{
int value;
@@ -4732,6 +4751,7 @@ weechat_guile_api_module_init (void *data)
API_DEF_FUNC(hdata_get_list, 2);
API_DEF_FUNC(hdata_check_pointer, 3);
API_DEF_FUNC(hdata_move, 3);
+ API_DEF_FUNC(hdata_search, 4);
API_DEF_FUNC(hdata_char, 3);
API_DEF_FUNC(hdata_integer, 3);
API_DEF_FUNC(hdata_long, 3);