lua-users home
lua-l archive

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


Hi,

I just want to make sure about these two details regarding the ref.
mechnism:
1) Can luaL_ref return the index 0? I'm almost sure that the answer is no
but luaL_unref checks that ref >= 0. Shouldn't that be ref > 2?
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?

Btw how come there's no luaL_getref macro? I know there is lua_getref but
this is supposed to be there for compatibility purposes and besides it
wouldn't look 'consistent' to use luaL_ref/unref and lua_getref. Not that
it's terribly important though...

Dimitris