God knows what's modified

This commit is contained in:
2021-01-02 13:31:18 -05:00
parent c751678179
commit b03aada315
22 changed files with 1577 additions and 294 deletions

View File

@@ -9,14 +9,14 @@
// if globalname is already present, and not a table, error.
// if globalname is not present, create and initialize it.
//
LuaDefineGlobalFunction(globaldb_global) {
LuaDefine(globaldb_global, "f") {
LuaArg globalname;
LuaRet globaltab;
LuaVar globaldb;
LuaStack LS(L, globalname, globaltab, globaldb);
LS.checktype(globalname, LUA_TSTRING);
LS.checkstring(globalname);
// Get a pointer to the globaldb.
LS.getfield(globaldb, LuaRegistry, "globaldb");
if (!LS.istable(globaldb)) {
@@ -29,7 +29,7 @@ LuaDefineGlobalFunction(globaldb_global) {
if (LS.istable(globaltab)) {
return LS.result();
} else if (!LS.isnil(globaltab)) {
luaL_error(L, "%s is not a global", LS.tostring(globalname).c_str());
luaL_error(L, "%s is not a global", LS.ckstring(globalname).c_str());
}
// Create a new globaltab and store it in the globaldb.