summaryrefslogtreecommitdiff
path: root/src/plugins/perl
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/perl
parentfcd71d14bc23a908f33224f1de91ab740dd40ff0 (diff)
downloadweechat-509a58b1d54420c62b1d9069e91512983f7ca44a.zip
api: add new function hdata_search
Diffstat (limited to 'src/plugins/perl')
-rw-r--r--src/plugins/perl/weechat-perl-api.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/plugins/perl/weechat-perl-api.c b/src/plugins/perl/weechat-perl-api.c
index 3578e9f3f..11d3f1c8c 100644
--- a/src/plugins/perl/weechat-perl-api.c
+++ b/src/plugins/perl/weechat-perl-api.c
@@ -4462,6 +4462,29 @@ XS (XS_weechat_api_hdata_move)
API_RETURN_STRING_FREE(result);
}
+XS (XS_weechat_api_hdata_search)
+{
+ char *result, *hdata, *pointer, *search;
+ int move;
+ dXSARGS;
+
+ API_FUNC(1, "hdata_search", API_RETURN_EMPTY);
+ if (items < 4)
+ API_WRONG_ARGS(API_RETURN_EMPTY);
+
+ hdata = SvPV_nolen (ST (0));
+ pointer = SvPV_nolen (ST (1));
+ search = SvPV_nolen (ST (2));
+ move = SvIV(ST (3));
+
+ result = API_PTR2STR(weechat_hdata_search (API_STR2PTR(hdata),
+ API_STR2PTR(pointer),
+ search,
+ move));
+
+ API_RETURN_STRING_FREE(result);
+}
+
XS (XS_weechat_api_hdata_char)
{
char *hdata, *pointer, *name;
@@ -4965,6 +4988,7 @@ weechat_perl_api_init (pTHX)
API_DEF_FUNC(hdata_get_list);
API_DEF_FUNC(hdata_check_pointer);
API_DEF_FUNC(hdata_move);
+ API_DEF_FUNC(hdata_search);
API_DEF_FUNC(hdata_char);
API_DEF_FUNC(hdata_integer);
API_DEF_FUNC(hdata_long);