[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: what replacement for (obsolete) lua_ref in 5.0 ?
- From: Roberto Ierusalimschy <roberto@...>
- Date: Tue, 11 Feb 2003 09:04:55 +0000
> I way just wondering: the current implementation makes use of the numeric
> indexes in the registry table. But lua_ref() and related stuff is here for
> compatibility only (as mentionned in lua.h), meaning that it should not
> remain, right ?
More or less. The macros lua_ref/lua_unref/lua_getref are for
compatibility, but the functions luaL_ref/luaL_unref are not. That is,
Lua keeps a reference mechanism, but now you can choose to put your
stuff into the registry or into a private table of yours (which may be a
weak table, for instance).
-- Roberto