lua-users home
lua-l archive

RE: Saving (part of) the lua state

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


> 
> 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

AltStyle によって変換されたページ (->オリジナル) /