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:
Luca Bruno 2015-01-11 09:40:39 +01:00
parent 217252dee7
commit 31483138ec

View File

@ -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));
}
};
}