lua: fix boolean return value (as integer) in API functions
parent
255e46eaef
commit
7949146687
|
@ -44,6 +44,7 @@ Bug fixes::
|
|||
* guile: return integer (0/1) instead of boolean in API functions
|
||||
* guile: fix return value of static strings in API functions
|
||||
* irc: fix CTCP PING reply when the option irc.ctcp.ping is set to non-empty value
|
||||
* lua: fix boolean return value (as integer) in API functions
|
||||
* relay: fix parsing of CAP command without arguments in irc protocol, send ACK only if all capabilities received are OK and NAK otherwise (issue #1040)
|
||||
|
||||
Tests::
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue