[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: luaL_ref/luaL_unref details
- From: Dimitris Papavasileiou <jimmyp@...>
- Date: Sun, 8 Feb 2004 23:17:05 +0200
I just want to make sure about these two details regarding the ref.
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...