[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Protocol Specification in Lua
- From: Ico <lua@...>
- Date: Sat, 2 Oct 2010 12:20:15 +0200
* On 2010-10-02 Sean Conner <sean@conman.org> wrote :
> Okay, now I'm curious---how does one *get* a compiled Lua table? I can
> see how to get a Lua function (in fact, I'm doing that now, only between
> separate Lua instances and not over a network connection) but a table?
What about compiling a function returning the table:
function foo()
return { "one", "two", "three" }
end
local compiled = string.dump(foo)
and to retrieve the table do a loadstring:
ti loadstring(compiled)()
--
:wq
^X^Cy^K^X^C^C^C^C