|
|
|
|
|
|
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|
-- Used to clear plain numeric tables |
|
|
-- Used to clear plain numeric tables |
|
|
table.clear = table.clear or function(tbl) |
|
|
|
|
|
|
|
|
local clear_fcn = table.clear or function(tbl) |
|
|
local l = #tbl |
|
|
local l = #tbl |
|
|
for i=1,l do tbl[i] = nil end |
|
|
for i=1,l do tbl[i] = nil end |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|
-- Do not write the last chunk of out as it will be processed afterwards |
|
|
-- Do not write the last chunk of out as it will be processed afterwards |
|
|
if not cursor == 0 then |
|
|
if not cursor == 0 then |
|
|
dump_out(out, opts, false) |
|
|
dump_out(out, opts, false) |
|
|
table.clear(out) |
|
|
|
|
|
|
|
|
clear_fcn(out) |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|
until cursor == 0 |
|
|
until cursor == 0 |