lua-users home
lua-l archive

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


Ok, and thanks for mentioning lanes.

________________________________

Markus Heukelom

Incontrol Enterprise Dynamics
T: +31 (0)346 552500
E: Markus.Heukelom@EnterpriseDynamics.com
W: www.EnterpriseDynamics.com 
 

> -----Original Message-----
> From: lua-bounces@bazar2.conectiva.com.br 
> [mailto:lua-bounces@bazar2.conectiva.com.br] On Behalf Of Asko Kauppi
> Sent: Monday, October 22, 2007 4:00 PM
> To: Lua list
> Subject: Re: Saving (part of) the lua state
> 
> 
> In that case, luac saves the (invisible) main chunk of the 
> file test.lua.  Which is a function that has your "state=" 
> line as its contents.
> 
> Luac does not save runtime generated values.
> 
> -asko
> 
> 
> Markus Heukelom kirjoitti 22.10.2007 kello 15:39:
> 
> >>
> >> luac does not save the lua_State: it saves functions.
> >>
> >
> > Sorry, I didn't mean the saving the lua_State, but just Lua 
> value(s).
> >
> > If luac saves functions, then what happens if I do this:
> >
> > test.lua:
> >
> > state = {test = "value"}
> >
> >
> > luac -o test.luac test.lua
> >
> > lua
> >> dofile("test.luac")
> >> print(state.test)
> > value
> >
> > Obviously, state is not a function, but luac does save it, right?  
> > Does it
> > save _G as a function (closure) or something? (I looked a bit a the 
> > output of luac -l test.luac)
> >
> > Thanks.
> >
> > Markus Heukelom
> >
> 
>