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

api: return integer in function gui_completion_search (issue #1484)

This commit is contained in:
Sébastien Helleu
2020-04-28 10:46:49 +02:00
parent 2bd8e91b54
commit d1a427b67f
16 changed files with 139 additions and 95 deletions
+8 -8
View File
@@ -4290,22 +4290,22 @@ API_FUNC(completion_new)
API_FUNC(completion_search)
{
char *completion, *data;
int position, direction;
int position, direction, rc;
API_INIT_FUNC(1, "completion_search", API_RETURN_ERROR);
API_INIT_FUNC(1, "completion_search", API_RETURN_INT(0));
completion = NULL;
position = 0;
direction = 1;
if (!PyArg_ParseTuple (args, "ssii", &completion, &data, &position,
&direction))
API_WRONG_ARGS(API_RETURN_ERROR);
API_WRONG_ARGS(API_RETURN_INT(0));
weechat_completion_search (API_STR2PTR(completion),
data,
position,
direction);
rc = weechat_completion_search (API_STR2PTR(completion),
data,
position,
direction);
API_RETURN_OK;
API_RETURN_INT(rc);
}
API_FUNC(completion_free)