[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Pre-compiling with luaL_loadbuffer
- From: Alex Sandro Queiroz e Silva <ventonegro@...>
- Date: Thu, 02 Jun 2005 16:57:33 -0300
I've been reading this list for quite a while, silently
lurking, and have been using LUA on and off for a little
while. I've embedded it in a few projects, however, I've
come across something which seems easy enough, however,
I've been unable to implement it. Using luaL_loadbuffer,
I'm loading a chunk of LUA code from a string. I need to
be able to save ('cache') this pre-compiled code so that it
may be re-executed. How do I save the index to that code
once it's been pushed onto the stack by luaL_loadbuffer,
and how do I call this code from that index?
Store it in a table with lua_settable().