diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2015-03-01 09:57:35 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2015-03-01 09:57:35 +0100 |
commit | 5e886961bdebce35103d177e2a91615f1be587d9 (patch) | |
tree | 8e5119375584595ebb3bcedff657181c564aec9a /src/plugins/lua | |
parent | 72b86741931bdfd5a45648e5156d9d1ae728f023 (diff) | |
download | weechat-5e886961bdebce35103d177e2a91615f1be587d9.zip |
scripts: fix return code of function bar_set in python/perl/ruby/lua/tcl/guile plugins
Diffstat (limited to 'src/plugins/lua')
-rw-r--r-- | src/plugins/lua/weechat-lua-api.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/plugins/lua/weechat-lua-api.c b/src/plugins/lua/weechat-lua-api.c index a62fc0418..6c2db299a 100644 --- a/src/plugins/lua/weechat-lua-api.c +++ b/src/plugins/lua/weechat-lua-api.c @@ -4055,20 +4055,19 @@ API_FUNC(bar_new) API_FUNC(bar_set) { const char *bar, *property, *value; + int rc; - API_INIT_FUNC(1, "bar_set", API_RETURN_ERROR); + API_INIT_FUNC(1, "bar_set", API_RETURN_INT(0)); if (lua_gettop (L) < 3) - API_WRONG_ARGS(API_RETURN_ERROR); + API_WRONG_ARGS(API_RETURN_INT(0)); bar = lua_tostring (L, -3); property = lua_tostring (L, -2); value = lua_tostring (L, -1); - weechat_bar_set (API_STR2PTR(bar), - property, - value); + rc = weechat_bar_set (API_STR2PTR(bar), property, value); - API_RETURN_OK; + API_RETURN_INT(rc); } API_FUNC(bar_update) |