[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: efficient calling of lua code
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Mon, 30 Sep 2002 20:28:45 -0300
>> But how do I correctly call this not explicitly defined "top level
>> function" containing all code of my script?
>
>You can't, but you can move the same code inside a function and call that
>instead.
In Lua 5.0, you can get the "top level function": it's left on the top of
the stack by lua_load in C and returned by loadfile or loadstring in Lua.
--lhf