Reimplemented 'print', channeled it through PrintBuffer
This commit is contained in:
@@ -220,4 +220,16 @@ LuaDefine(world_pprint, "f") {
|
||||
(*ostream) << std::endl;
|
||||
}
|
||||
return LS.result();
|
||||
}
|
||||
|
||||
LuaDefine(world_print, "f") {
|
||||
World *w = World::fetch_global_pointer(L);
|
||||
std::ostream *ostream = w->lthread_print_stream();
|
||||
LuaStack LS(L);
|
||||
for (int i = 1; i <= lua_gettop(L); i++) {
|
||||
LuaSpecial root(i);
|
||||
atomic_print(LS, root, ostream);
|
||||
(*ostream) << std::endl;
|
||||
}
|
||||
return LS.result();
|
||||
}
|
||||
Reference in New Issue
Block a user