mirror of
https://github.com/holub/mame
synced 2025-10-06 09:00:04 +03:00
luaengine: luabridge Stack<UINT64> specialization
Provide a Stack<UINT64> specialization for luabridge, later needed by some APIs. Signed-off-by: Luca Bruno <lucab@debian.org>
This commit is contained in:
parent
217252dee7
commit
31483138ec
@ -961,3 +961,21 @@ void lua_engine::start()
|
||||
{
|
||||
resume(m_lua_state);
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// LuaBridge Stack specializations
|
||||
//**************************************************************************
|
||||
|
||||
namespace luabridge {
|
||||
template <>
|
||||
struct Stack <UINT64> {
|
||||
static inline void push (lua_State* L, UINT64 value) {
|
||||
lua_pushunsigned(L, static_cast <lua_Unsigned> (value));
|
||||
}
|
||||
|
||||
static inline UINT64 get (lua_State* L, int index) {
|
||||
return static_cast <UINT64> (luaL_checkunsigned (L, index));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user