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

@@ -135,7 +135,7 @@ static void transmit_value(LuaStack &MLS, LuaSlot mval, LuaSlot mtnmap, StreamBu
}
}
static void transmit_value_debug_string(StreamBuffer *sb, std::ostringstream &oss) {
static void transmit_value_debug_string(StreamBuffer *sb, eng::ostringstream &oss) {
int kind = sb->read_uint8();
switch (kind) {
case LUA_TBOOLEAN: {
@@ -231,9 +231,9 @@ static bool diff_tables(LuaStack &SLS0, LuaSlot stnmap, LuaSlot stab,
return (nupdates > 0);
}
static std::string diff_tables_debug_string(StreamBuffer *sb) {
std::vector<std::string> sorted;
std::ostringstream oss;
static eng::string diff_tables_debug_string(StreamBuffer *sb) {
eng::vector<eng::string> sorted;
eng::ostringstream oss;
int ndiffs = sb->read_int32();
for (int i = 0; i < ndiffs; i++) {
transmit_value_debug_string(sb, oss);
@@ -243,7 +243,7 @@ static std::string diff_tables_debug_string(StreamBuffer *sb) {
oss.str("");
}
std::sort(sorted.begin(), sorted.end());
for (const std::string &s : sorted) {
for (const eng::string &s : sorted) {
oss << s << ";";
}
return oss.str();
@@ -265,7 +265,7 @@ static void set_transmitted_value(LuaStack &LS, LuaSlot tangibles, LuaSlot ntmap
return;
}
case LUA_TSTRING: {
std::string value = sb->read_string();
eng::string value = sb->read_string();
DebugLine(dbc) << dbinfo << "'" << value << "'";
LS.set(target, value);
return;
@@ -277,7 +277,7 @@ static void set_transmitted_value(LuaStack &LS, LuaSlot tangibles, LuaSlot ntmap
return;
}
case LUA_TT_CLASS: {
std::string value = sb->read_string();
eng::string value = sb->read_string();
DebugLine(dbc) << dbinfo << "class " << value;
LS.makeclass(target, value);
return;