mirror of
https://github.com/weechat/weechat.git
synced 2026-06-25 20:36:38 +02:00
lua: fix boolean return value (as integer) in API functions
This commit is contained in:
@@ -67,8 +67,12 @@
|
||||
plugin_script_str2ptr (weechat_lua_plugin, \
|
||||
LUA_CURRENT_SCRIPT_NAME, \
|
||||
lua_function_name, __string)
|
||||
#define API_RETURN_OK return 1
|
||||
#define API_RETURN_ERROR return 0
|
||||
#define API_RETURN_OK \
|
||||
lua_pushinteger (L, 1); \
|
||||
return 1
|
||||
#define API_RETURN_ERROR \
|
||||
lua_pushinteger (L, 0); \
|
||||
return 1
|
||||
#define API_RETURN_EMPTY \
|
||||
lua_pushstring (L, ""); \
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user