Implement LuaExtraArgs
This commit is contained in:
@@ -728,14 +728,12 @@ LuaDefine(pprint, "obj1, obj2, ...",
|
||||
"|") {
|
||||
World *w = World::fetch_global_pointer(L);
|
||||
std::ostream *ostream = w->lthread_print_stream();
|
||||
int n = lua_gettop(L);
|
||||
LuaDefStack LS(L);
|
||||
for (int i = 1; i <= n; i++) {
|
||||
LuaSpecial root(i);
|
||||
pprint(LS, root, PrettyPrintOptions(), ostream);
|
||||
if (i < n) (*ostream) << "\n";
|
||||
LuaExtraArgs extra;
|
||||
LuaDefStack LS(L, extra);
|
||||
for (int i = 0; i < extra.size(); i++) {
|
||||
pprint(LS, extra[i], PrettyPrintOptions(), ostream);
|
||||
(*ostream) << std::endl;
|
||||
}
|
||||
(*ostream) << std::endl;
|
||||
return LS.result();
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user