difference transmission of source databases done

This commit is contained in:
2021-09-23 12:40:21 -04:00
parent 6fbe700107
commit 6490db43fc
8 changed files with 320 additions and 44 deletions

View File

@@ -263,11 +263,18 @@ std::string LuaStack::classname(LuaSlot tab) {
lua_pushstring(L_, "__class");
lua_rawget(L_, tab);
if (lua_type(L_, -1) == LUA_TSTRING) {
size_t len;
const char *s = lua_tolstring(L_, -1, &len);
result = std::string(s, len);
lua_pushglobaltable(L_); // cname table
lua_pushvalue(L_, -2); // cname table cname
lua_rawget(L_, -2); // cname table ctab
if (lua_rawequal(L_, -1, tab)) {
size_t len;
const char *s = lua_tolstring(L_, -3, &len);
result = std::string(s, len);
}
lua_pop(L_, 3);
} else {
lua_pop(L_, 1);
}
lua_pop(L_, 1);
}
return result;
}