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

@@ -80,7 +80,7 @@ LuaDefine(tangible_setclass, "tan,class",
LuaStack LS(L, tanobj, classname, classtab, mt);
World *w = World::fetch_global_pointer(L);
w->tangible_get(LS, tanobj);
std::string err = LS.getclass(classtab, classname);
eng::string err = LS.getclass(classtab, classname);
if (err != "") {
luaL_error(L, "%s", err.c_str());
}
@@ -101,7 +101,7 @@ LuaDefine(tangible_getclass, "tan",
w->tangible_get(LS, tanobj);
LS.getmetatable(mt, tanobj);
LS.rawget(classtab, mt, "__index");
std::string name = LS.classname(classtab);
eng::string name = LS.classname(classtab);
if (name == "") {
LS.set(classname, LuaNil);
} else {
@@ -139,7 +139,7 @@ LuaDefine(tangible_build, "configtable",
LS.checktable(config);
// Get the class of the new tangible.
LS.rawget(classname, config, "class");
std::string err = LS.getclass(classtab, classname);
eng::string err = LS.getclass(classtab, classname);
if (err != "") {
luaL_error(L, "%s", err.c_str());
}
@@ -280,7 +280,7 @@ LuaDefine(tangible_scan, "plane,x,y,radius,omit_nowhere",
LuaRet list;
LuaStack LS(L, lplane, lx, ly, lradius, lomit_nowhere, list);
World *w = World::fetch_global_pointer(L);
std::string plane = LS.ckstring(lplane);
eng::string plane = LS.ckstring(lplane);
double x = LS.cknumber(lx);
double y = LS.cknumber(ly);
double radius = LS.cknumber(lradius);
@@ -314,7 +314,7 @@ LuaDefine(tangible_nopredict, "",
LuaDefine(pprint, "obj1,obj2,...",
"|Pretty-print object or objects.") {
World *w = World::fetch_global_pointer(L);
std::ostream *ostream = w->lthread_print_stream();
eng::ostream *ostream = w->lthread_print_stream();
LuaStack LS(L);
for (int i = 1; i <= lua_gettop(L); i++) {
LuaSpecial root(i);
@@ -327,7 +327,7 @@ LuaDefine(pprint, "obj1,obj2,...",
LuaDefine(print, "obj1,obj2,...",
"|Print object or objects.") {
World *w = World::fetch_global_pointer(L);
std::ostream *ostream = w->lthread_print_stream();
eng::ostream *ostream = w->lthread_print_stream();
LuaStack LS(L);
int n = lua_gettop(L);
for (int i = 1; i <= n; i++) {
@@ -342,10 +342,10 @@ LuaDefine(print, "obj1,obj2,...",
LuaDefine(doc, "function",
"|Print documentation for specified function.") {
World *w = World::fetch_global_pointer(L);
std::ostream *ostream = w->lthread_print_stream();
eng::ostream *ostream = w->lthread_print_stream();
LuaArg func;
LuaStack LS(L, func);
std::string doc = SourceDB::function_docs(LS, func);
eng::string doc = SourceDB::function_docs(LS, func);
if (doc == "") {
(*ostream) << "no doc found" << std::endl;
}