lua-users home
lua-l archive

save variables as binary data

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


I'm still working on my Lua project, that calls various Lua functions.
The functions need some variables to be stored between each run. What I do is
I return 4 variables from my Lua function, store it, and before the next
run I push them to the stack. Everything is working as expected.
Can I somehow store the whole environment? I thinking in embedded OS terms,
because back in old days I was writing one such OS for Atmel MCU.
So I'm thinking about some way to store any number of variables as binary
data, just like when I store the stack pointer, the PC and registers of my
AVR.
I don't need to interrupt my Lua code, it's okay to do this when it returns.
Any help is welcome.
Thanks,
Levente

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