summaryrefslogtreecommitdiff
path: root/src/plugins/python/weechat-python-api.c
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/python/weechat-python-api.c
parentfcd71d14bc23a908f33224f1de91ab740dd40ff0 (diff)
downloadweechat-509a58b1d54420c62b1d9069e91512983f7ca44a.zip
api: add new function hdata_search
Diffstat (limited to 'src/plugins/python/weechat-python-api.c')
-rw-r--r--src/plugins/python/weechat-python-api.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/plugins/python/weechat-python-api.c b/src/plugins/python/weechat-python-api.c
index 6eef2ac4f..e2d776d69 100644
--- a/src/plugins/python/weechat-python-api.c
+++ b/src/plugins/python/weechat-python-api.c
@@ -4632,6 +4632,29 @@ weechat_python_api_hdata_move (PyObject *self, PyObject *args)
}
static PyObject *
+weechat_python_api_hdata_search (PyObject *self, PyObject *args)
+{
+ char *result, *hdata, *pointer, *search;
+ int move;
+ PyObject *return_value;
+
+ API_FUNC(1, "hdata_search", API_RETURN_EMPTY);
+ hdata = NULL;
+ pointer = NULL;
+ search = NULL;
+ move = 0;
+ if (!PyArg_ParseTuple (args, "sssi", &hdata, &pointer, &search, &move))
+ API_WRONG_ARGS(API_RETURN_EMPTY);
+
+ result = API_PTR2STR(weechat_hdata_search (API_STR2PTR(hdata),
+ API_STR2PTR(pointer),
+ search,
+ move));
+
+ API_RETURN_STRING_FREE(result);
+}
+
+static PyObject *
weechat_python_api_hdata_char (PyObject *self, PyObject *args)
{
char *hdata, *pointer, *name;
@@ -5117,6 +5140,7 @@ PyMethodDef weechat_python_funcs[] =
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),