Add dprint function, add engio.move

This commit is contained in:
2024-02-13 16:49:24 -05:00
parent 21a1cf688f
commit 3c1df4ebb9
2 changed files with 19 additions and 23 deletions

View File

@@ -900,6 +900,21 @@ LuaDefine(print, "obj1, obj2, ...",
return 0;
}
LuaDefine(dprint, "obj1, obj2, ...",
"|Print object or objects on the debug console.") {
std::ostringstream oss;
LuaCoreStack LS(L);
int n = lua_gettop(L);
for (int i = 1; i <= n; i++) {
LuaSpecial root(i);
atomic_print(LS, root, false, &oss);
if (i < n) oss << " ";
}
oss << std::endl;
util::dprintview(oss.str());
return 0;
}
LuaDefine(doc, "function",
"|Print documentation for specified function.") {
World *w = World::fetch_global_pointer(L);