diff_tables and patch_table are working and tested
This commit is contained in:
@@ -1,16 +1,6 @@
|
||||
#include "luastack.hpp"
|
||||
#include "globaldb.hpp"
|
||||
|
||||
LuaDefine(globaldb_enable, "c") {
|
||||
LuaVar globaldb;
|
||||
LuaStack LS(L, globaldb);
|
||||
LS.rawget(globaldb, LuaRegistry, "globaldb");
|
||||
if (!LS.istable(globaldb)) {
|
||||
LS.newtable(globaldb);
|
||||
LS.rawset(LuaRegistry, "globaldb", globaldb);
|
||||
}
|
||||
return LS.result();
|
||||
}
|
||||
|
||||
// Get a table from the global database.
|
||||
//
|
||||
@@ -25,7 +15,7 @@ LuaDefine(globaldb_global, "f") {
|
||||
LuaVar globaldb;
|
||||
LuaStack LS(L, globalname, globaltab, globaldb);
|
||||
|
||||
// Get a pointer to the globaldb.
|
||||
// Get a pointer to the globaldb.
|
||||
LS.rawget(globaldb, LuaRegistry, "globaldb");
|
||||
if (!LS.istable(globaldb)) {
|
||||
luaL_error(L, "globaldb is not enabled");
|
||||
|
||||
Reference in New Issue
Block a user