From 509a58b1d54420c62b1d9069e91512983f7ca44a Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Sun, 21 Apr 2013 11:26:52 +0200 Subject: api: add new function hdata_search --- src/plugins/guile/weechat-guile-api.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/plugins/guile') 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 @@ -4263,6 +4263,25 @@ weechat_guile_api_hdata_move (SCM hdata, SCM pointer, SCM count) API_RETURN_STRING_FREE(result); } +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) { @@ -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); -- cgit v1.2.3