Re: Integer keys in registry
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Integer keys in registry
- From: Kevin Martin <kev82@...>
- Date: 2012年5月17日 09:53:33 +0100
On 17 May 2012, at 09:46, Alexandre Rion wrote:
> But when I'm looking to the luaL_ref/luaL_unref source code, I don't find any access to the registry. Where does it come from?
The registry is just a table with index LUA_REGISTRYINDEX, so to store a reference in the registry table use
luaL_ref(l, LUA_REGISTRYINDEX)
This allows you to also use luaL_ref with any other table as well.
Thanks,
Kev