From 989c67cea49ecefc974e3cf21d227ffc17d35d07 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Sat, 22 Oct 2016 11:49:09 +0200 Subject: added new types, fixing lua part (nw) --- src/frontend/mame/luaengine.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/frontend/mame/luaengine.cpp') diff --git a/src/frontend/mame/luaengine.cpp b/src/frontend/mame/luaengine.cpp index 4dd56437644..22380727f59 100644 --- a/src/frontend/mame/luaengine.cpp +++ b/src/frontend/mame/luaengine.cpp @@ -2832,4 +2832,26 @@ namespace luabridge { return static_cast (luaL_checkunsigned (L, index)); } }; + + template <> + struct Stack { + static inline void push(lua_State* L, char16_t value) { + lua_pushunsigned(L, static_cast (value)); + } + + static inline char16_t get(lua_State* L, int index) { + return static_cast (luaL_checkunsigned(L, index)); + } + }; + + template <> + struct Stack { + static inline void push(lua_State* L, char32_t value) { + lua_pushunsigned(L, static_cast (value)); + } + + static inline char32_t get(lua_State* L, int index) { + return static_cast (luaL_checkunsigned(L, index)); + } + }; } -- cgit v1.2.3-70-g09d2