mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 16:01:10 +02:00
lua: add compatibility to lua 5.3 and 5.4; copy from https://github.com/SteveKChiu/lua-intf/blob/master/LuaIntf/LuaCompat.h
Origin commit data
------------------
Branch: ni/coolstream
Commit: e8e77b7f41
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2024-11-10 (Sun, 10 Nov 2024)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -62,6 +62,33 @@
|
||||
/* autogenerated from luainstance.h */
|
||||
#include "lua_api_version.h"
|
||||
|
||||
#if LUA_VERSION_NUM >= 503 /* Lua 5.3 */
|
||||
|
||||
#ifndef luaL_checkint
|
||||
# define luaL_checkint luaL_checkinteger
|
||||
#endif
|
||||
|
||||
#ifndef lua_pushunsigned
|
||||
#define lua_pushunsigned(L, n) \
|
||||
lua_pushinteger(L, static_cast<lua_Integer>(n))
|
||||
|
||||
#define lua_tounsignedx(L, i, is) \
|
||||
static_cast<lua_Unsigned>(lua_tointegerx(L, i, is))
|
||||
|
||||
#define lua_tounsigned(L, i) \
|
||||
lua_tounsignedx(L, (i), nullptr)
|
||||
#endif
|
||||
|
||||
#ifndef luaL_checkunsigned
|
||||
#define luaL_checkunsigned(L, a) \
|
||||
static_cast<lua_Unsigned>(luaL_checkinteger(L, a))
|
||||
|
||||
#define luaL_optunsigned(L, a, d) \
|
||||
static_cast<lua_Unsigned>(luaL_optinteger(L, a, static_cast<lua_Integer>(d)))
|
||||
#endif
|
||||
|
||||
#endif /* Lua 5.3 */
|
||||
|
||||
extern CPictureViewer *g_PicViewer;
|
||||
extern cVideo *videoDecoder;
|
||||
|
||||
|
Reference in New Issue
Block a user