Add dprint function, add engio.move
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user