diff options
author | chai <chaifix@163.com> | 2019-03-16 19:29:23 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-03-16 19:29:23 +0800 |
commit | d29f5f4aebd90b1e256967801b28a5990249b2e7 (patch) | |
tree | f4f1390b57a39e0493e0f74b40dd3996d88d04e5 /Source/3rdParty/Luax/luax_cfunctions.cpp | |
parent | 1ab2501db0f9e14f138292880e37120e7a6184de (diff) |
*luax
Diffstat (limited to 'Source/3rdParty/Luax/luax_cfunctions.cpp')
-rw-r--r-- | Source/3rdParty/Luax/luax_cfunctions.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Source/3rdParty/Luax/luax_cfunctions.cpp b/Source/3rdParty/Luax/luax_cfunctions.cpp new file mode 100644 index 0000000..d93a0ee --- /dev/null +++ b/Source/3rdParty/Luax/luax_cfunctions.cpp @@ -0,0 +1,19 @@ +#include "luax_cfunctions.h" +#include "luax_config.h" + +namespace Luax +{ + + 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 |