diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2020-04-28 10:46:49 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2020-04-28 10:46:49 +0200 |
commit | d1a427b67fc57c1868f6ebddd458cfa5252aa848 (patch) | |
tree | 03dece50d9f1683ff8869a2e1f078e6d2da0bbf1 /src/plugins/php/weechat-php-api.c | |
parent | 2bd8e91b54625a8758d7ed6e272db7c291cafb3b (diff) | |
download | weechat-d1a427b67fc57c1868f6ebddd458cfa5252aa848.zip |
api: return integer in function gui_completion_search (issue #1484)
Diffstat (limited to 'src/plugins/php/weechat-php-api.c')
-rw-r--r-- | src/plugins/php/weechat-php-api.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/php/weechat-php-api.c b/src/plugins/php/weechat-php-api.c index 981f3f365..7a736061d 100644 --- a/src/plugins/php/weechat-php-api.c +++ b/src/plugins/php/weechat-php-api.c @@ -4291,21 +4291,21 @@ API_FUNC(completion_search) zend_long z_position, z_direction; char *data; struct t_gui_completion *completion; - 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)); if (zend_parse_parameters (ZEND_NUM_ARGS(), "SSll", &z_completion, &z_data, &z_position, &z_direction) == FAILURE) - API_WRONG_ARGS(API_RETURN_ERROR); + API_WRONG_ARGS(API_RETURN_INT(0)); completion = (struct t_gui_completion *)API_STR2PTR(ZSTR_VAL(z_completion)); data = ZSTR_VAL(z_data); position = (int)z_position; direction = (int)z_direction; - weechat_completion_search (completion, data, position, direction); + rc = weechat_completion_search (completion, data, position, direction); - API_RETURN_OK; + API_RETURN_INT(rc); } API_FUNC(completion_free) |