lua-users home
lua-l archive

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


Since there doesn't seem to be any docs for the C call next(), here is 
what I've figured out:

int lua_next(lua_Object tableObject, int tableIndex);	/* Out: ref, value */ 
	return: next index or 0 when end of table is reached
    tableIndex: 0 if you want the first item in the table
     lua stack: two lua_Objects are pushed onto the stack; first the key 
                and then the value of the entry

Russ