diff options
author | chai <chaifix@163.com> | 2021-10-18 19:56:41 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-10-18 19:56:41 +0800 |
commit | 45328cbadd8a946c19a77301f218efbf650e2f28 (patch) | |
tree | 8ec4f3a9737b2cbb9744f8347a56783743be2a4c /Runtime/Lua/LuaBind/LuaBindCFunctions.cpp | |
parent | b5702ece4c2cf751c252e76fb885a7ec41ccabe8 (diff) |
*misc
Diffstat (limited to 'Runtime/Lua/LuaBind/LuaBindCFunctions.cpp')
-rw-r--r-- | Runtime/Lua/LuaBind/LuaBindCFunctions.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Runtime/Lua/LuaBind/LuaBindCFunctions.cpp b/Runtime/Lua/LuaBind/LuaBindCFunctions.cpp new file mode 100644 index 0000000..ca662a3 --- /dev/null +++ b/Runtime/Lua/LuaBind/LuaBindCFunctions.cpp @@ -0,0 +1,19 @@ +#include "LuaBindCFunctions.h" +#include "LuaBindConfig.h" + +namespace LuaBind +{ + + int luax_c_getupvalue(lua_State* L) + { + lua_pushvalue(L, lua_upvalueindex(1)); + return 1; + } + + int luax_c_errfunc(lua_State* L) + { + cc8* msg = luaL_optstring(L, lua_upvalueindex(1), ""); + return luaL_error(L, msg); + } + +}
\ No newline at end of file |