lua-users home
lua-l archive

Re: problems upgrading from 5.0.3 - 5.1 with lua_newthread luaL_ref lua_gc and lua_resume

[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/

AltStyle によって変換されたページ (->オリジナル) /