Change how builtin functions are loaded, better error checking

This commit is contained in:
2022-03-16 17:05:20 -04:00
parent 3b1c3e022a
commit c1ce1bfcc0
5 changed files with 184 additions and 99 deletions

View File

@@ -7,11 +7,12 @@ LuaSpecial LuaRegistry(LUA_REGISTRYINDEX);
LuaNilMarker LuaNil;
LuaNewTableMarker LuaNewTable;
LuaFunctionReg::LuaFunctionReg(const char *n, const char *a, const char *d, lua_CFunction f) {
LuaFunctionReg::LuaFunctionReg(const char *n, const char *a, const char *d, bool s, lua_CFunction f) {
name_ = n;
args_ = a;
docs_ = d;
func_ = f;
sandbox_ = s;
next_ = All;
All = this;
}