lua-users home
lua-l archive

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


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?


> 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.


> 
> I looped indices calling lua_getLocal beginning with 1 until it returned
> null in lua 5.0.2. This is part of our debugger and is meant to display all
> local variables.

This should work the same in 5.1 (except that it would show more
variables).

-- Roberto