lua-users home
lua-l archive

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


Mark Hamburg:
>Where did the table come from?

I use lua_pushtable(L, *p->data);
in callback functions instead of:

lua_pushlightuserdata(L, p);
lua_rawget(L, LUA_REGISTRYINDEX);
[[
lua_pushlightuserdata(L, p->win);
lua_rawget(L, -2);
]]

Some objects stored in registry, others in subtable ([[...]
]). I may save the type of object in data or simply point 
to it's table (faster).