summaryrefslogtreecommitdiff
path: root/src/plugins/perl
diff options
context:
space:
mode:
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);