diff options
Diffstat (limited to 'Runtime/LuaBind/LuaBindCFunctions.cpp')
-rw-r--r-- | Runtime/LuaBind/LuaBindCFunctions.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Runtime/LuaBind/LuaBindCFunctions.cpp b/Runtime/LuaBind/LuaBindCFunctions.cpp new file mode 100644 index 0000000..ca662a3 --- /dev/null +++ b/Runtime/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 |