lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Roberto wrote:
>On Mon, Mar 20, 2006 at 04:17:04PM +0100, Sebastian Rohde wrote:
>> In fact I think that I by accident requested invalid stack indices. 

>Invalid *stack* indices or *local* indices?

Sorry - invalid local indices.

>> At least I guess that lua_getlocal returning "(*temporary)" does mean so?

>No. The behavior changed from 5.0 to 5.1, but it should be compatible.

>Lua 5.0 did not inspect C "locals"; 5.1 does. As they have no names,
>lua_getlocal returns this generic name "(*temporary)". But as soon
>as you index a non-existent local, lua_getlocal should return NULL,
>as in 5.0.

Thank you! I understand my problem now. My loop iterated over indices
1-infinite because the results of the lua_getlocal haven't been fetched
directly but after the loop. With the changed behaviour the growing stack
prevents the loop from aborting as every new stackitem creates a new local