[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Conceptual problem with gettable tag method
- From: Roberto Ierusalimschy <roberto@...>
- Date: Wed, 07 Jun 2000 15:50:25 -0300
> - do I use blocks (the code in the function can get large and use a whole
> pile of Lua calls)
You should not use blocks in code like that. Every function called by Lua
is automatically enclosed in a block. Usually, you need to use explicit
blocks only when C calls Lua in a loop, because then results can accumulate
and eventually the stack may fill up.
> - if I use them, since lua_endblock empties the stack, should I put it
> before the lua_pushnumber call (or any call that pushes, but could
> call Lua to do so) ?
*If* you use them, then you must put any push for results after the last
endblock.
-- Roberto