lua-users home
lua-l archive

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



On 31-Oct-06, at 11:28 PM, subatomic wrote:

>> lua_State *t = lua_newthread(L);
>> lua_pushlightuserdata(L, t);
>> lua_insert(L, -2); /* flip the top two stack elements */
>> lua_rawset(L, -3);

So I was reading this, and was wondering what the -3 is refering to?

Oops. I was thinking of having your own registry table.

s/-3/LUA_REGISTRYINDEX/