1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-24 20:06:38 +02:00

api: add new function strlen_screen

This commit is contained in:
Sebastien Helleu
2013-07-27 18:21:50 +02:00
parent 50ab62b75d
commit 6be17ac263
12 changed files with 242 additions and 2 deletions
+17
View File
@@ -260,6 +260,22 @@ weechat_python_api_ngettext (PyObject *self, PyObject *args)
API_RETURN_STRING(result);
}
static PyObject *
weechat_python_api_strlen_screen (PyObject *self, PyObject *args)
{
char *string;
int value;
API_FUNC(1, "strlen_screen", API_RETURN_INT(0));
string = NULL;
if (!PyArg_ParseTuple (args, "s", &string))
API_WRONG_ARGS(API_RETURN_INT(0));
value = weechat_strlen_screen (string);
API_RETURN_INT(value);
}
static PyObject *
weechat_python_api_string_match (PyObject *self, PyObject *args)
{
@@ -4975,6 +4991,7 @@ PyMethodDef weechat_python_funcs[] =
API_DEF_FUNC(iconv_from_internal),
API_DEF_FUNC(gettext),
API_DEF_FUNC(ngettext),
API_DEF_FUNC(strlen_screen),
API_DEF_FUNC(string_match),
API_DEF_FUNC(string_has_highlight),
API_DEF_FUNC(string_has_highlight_regex),