summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2016-10-22 11:49:09 +0200
committer Miodrag Milanovic <mmicko@gmail.com>2016-10-22 11:50:00 +0200
commit989c67cea49ecefc974e3cf21d227ffc17d35d07 (patch)
tree5f48ac0e94dfaf227df56542a6eb54f572007f52
parentcd78584ace0455ac8e533dc8d3a6b98b9571cb0d (diff)
added new types, fixing lua part (nw)
-rw-r--r--src/frontend/mame/luaengine.cpp22
1 files changed, 22 insertions, 0 deletions
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 <unsigned long long> (luaL_checkunsigned (L, index));
}
};
+
+ template <>
+ struct Stack <char16_t> {
+ static inline void push(lua_State* L, char16_t value) {
+ lua_pushunsigned(L, static_cast <lua_Unsigned> (value));
+ }
+
+ static inline char16_t get(lua_State* L, int index) {
+ return static_cast <char16_t> (luaL_checkunsigned(L, index));
+ }
+ };
+
+ template <>
+ struct Stack <char32_t> {
+ static inline void push(lua_State* L, char32_t value) {
+ lua_pushunsigned(L, static_cast <lua_Unsigned> (value));
+ }
+
+ static inline char32_t get(lua_State* L, int index) {
+ return static_cast <char32_t> (luaL_checkunsigned(L, index));
+ }
+ };
}