Migrated engine to using dlmalloc through eng::

This commit is contained in:
2022-02-24 02:17:41 -05:00
parent acc00289fb
commit f467944095
61 changed files with 631 additions and 590 deletions

View File

@@ -226,7 +226,7 @@ void World::patch_tanclass(StreamBuffer *sb, DebugCollector *dbc) {
LS.rawget(tab, tangibles, id);
assert(LS.istable(tab));
LS.getmetatable(meta, tab);
std::string name = sb->read_string();
eng::string name = sb->read_string();
DebugLine(dbc) << "tanclass " << id << "=" << name;
if (name == "") {
LS.rawset(meta, "__index", LuaNil);
@@ -261,8 +261,8 @@ void World::diff_tanclass(int64_t actor_id, World *master, StreamBuffer *xsb) {
SLS.getmetatable(smeta, stab);
MLS.rawget(mclass, mmeta, "__index");
SLS.rawget(sclass, smeta, "__index");
std::string mname = MLS.classname(mclass);
std::string sname = SLS.classname(sclass);
eng::string mname = MLS.classname(mclass);
eng::string sname = SLS.classname(sclass);
if (mname != sname) {
tsb.write_int64(id);
tsb.write_string(mname);
@@ -283,7 +283,7 @@ void World::patch_source(StreamBuffer *sb, DebugCollector *dbc) {
DebugBlock dbb(dbc, "patch_source");
bool modified = source_db_.patch(sb, dbc);
if (modified) {
std::string errs = source_db_.rebuild();
eng::string errs = source_db_.rebuild();
DebugLine(dbc) << "Source DB rebuilt";
// TODO: I don't currently have any good place to send the
// error messages. This is a stopgap.