lua-users home
lua-l archive

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


On 19/08/16 15:54, ThePhD wrote:
> I'm not sure if I want to ignore the metatable's index method, though
> (on the account of certain things masquerading like tables, such as
> certain kinds of userdata). 

JFYI.

It has been a while since I properly looked at the Lua source, so
somebody correct me if I am wrong, yet I do not think it is valid to use
lua_next on a userdata. From a quick look at the 5.1 source it would
seem this is correct at least for this version[1] as when api checks are
enabled it will by default assert due to the ttistable check.


[1] https://www.lua.org/source/5.1/lapi.c.html#lua_next



-- 
Liam