lua-users home
lua-l archive

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


1) Can luaL_ref return the index 0?

Currently no, but this is an implementation detail. If you need an index
that luaL_ref cannot return, use LUA_NOREF.


2) Is it ok to call luaL_unref with an index for which there is no
reference, or would that somehow mess up the table of free ref. indices?

It is not ok, unless that index is LUA_NOREF.

-- Roberto