1
0
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:
tomoe-mami
2016-11-01 14:18:47 +01:00
committed by Sébastien Helleu
parent dc3cdcbb7f
commit 899b397f3f
2 changed files with 17 additions and 0 deletions
+9
View File
@@ -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 */
/*