On 18-5-2011 5:49, Peter Münster wrote:
Hans Hagen<[email protected]> writes:
-- error: l-table.lua:565: unable to dump given function:
print(table.serialize(environment))
to be expected
And what about replacing line 565 by something like this:
handle(format("%s [%q]=loadstring(%q),",depth,k,
debug.getinfo(v).what == "C" and "C code" or dump(v)))
local function dummy() end
local f = getinfo(v).what == "C" and dump(dummy) or dump(v)
handle(format("%s [%q]=loadstring(%q),",depth,k,f))
(and some more places)
or
local f = getinfo(v).what == "C" and dump(function(...) return v(...)
end) or dump(v)
not that it makes much sense to dump functions
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________