[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua4 save/restore globals
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Fri, 28 Feb 2003 15:18:00 -0300
>Can someone point me at the best way to save
>and restore globals in Lua4 from C code?
>
> save globals
> do script
> restore globals
Something like this:
lua_getglobals(L);
lua_newtable(L);
-- fill this newtable with whatever you want
lua_setglobals(L);
-- do script, remove any returns
lua_setglobals(L);
--lhf