mirror of
https://github.com/weechat/weechat.git
synced 2026-06-24 20:06:38 +02:00
lua: use lua_pushinteger for int values in lua 5.3
This commit is contained in:
committed by
Sébastien Helleu
parent
dc3cdcbb7f
commit
899b397f3f
@@ -82,12 +82,21 @@
|
||||
if (__string) \
|
||||
free (__string); \
|
||||
return 1
|
||||
#if LUA_VERSION_NUM >= 503
|
||||
#define API_RETURN_INT(__int) \
|
||||
lua_pushinteger (L, __int); \
|
||||
return 1
|
||||
#define API_RETURN_LONG(__long) \
|
||||
lua_pushinteger (L, __long); \
|
||||
return 1
|
||||
#else
|
||||
#define API_RETURN_INT(__int) \
|
||||
lua_pushnumber (L, __int); \
|
||||
return 1
|
||||
#define API_RETURN_LONG(__long) \
|
||||
lua_pushnumber (L, __long); \
|
||||
return 1
|
||||
#endif /* LUA_VERSION_NUM >= 503 */
|
||||
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user