[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lua-l
Subject:    Re: Keeping the stack balanced
From:       Roberto Ierusalimschy <roberto () inf ! puc-rio ! br>
Date:       2001-02-22 13:03:05
Message-ID: 200102221300.KAA00548 () obatala ! inf ! puc-rio ! br
[Download RAW message or body]

The counting of lua_call is wrong:

  4 lua_call(L, 3, 2);     /* call function with 3 arguments and 2 results */
  3 ...

lua_call removes its arguments plus the function been called from the
stack, so after the call the stack will have only 2 elements.

-- Roberto

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic