lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> i made serialization function that can write out table with
> cross-references and (wow!) functions with (wow!) upvalues.

I could not make it run. Does it support *shared* upvalues as in the
program below? I mean, does it serialize f,g, and h correctly?

do
	local x=0
	function f() x=x+1 return end
	function g() x=x-1 return end
end

function h()
	assert(f(g()) == g(f()))
end