[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: One time scripts
- From: virgil@... (Virgil Smith)
- Date: Wed, 22 Oct 2003 14:05:49 -0500
> As I recall, there was no way in Lua 4.0 to load a chunk
> without calling it, but memory grows weak as time passes
> Rici.
A <very> quick scan of the API says, no, but a <very> quick scan of the code
shows lua_dofile calling "parse_file" and then lua_call'ing the result.
So just "export" "parse_file" and friends and poof instant loading without
running (even returning the chunk on the stack). After all what's a minor
source mod between friends. :-)