use cases for light userdata in lua?
snippet in lua
use cases for light userdata in lua?
user3383
// save a window handle
lua_pushlightuserdata(L, hKey);
lua_pushvalue(L,filt); // copy of filter table entry
lua_settable(L, treeindex);
// find data for a window handle
lua_pushstring(L, "__treeitems");
lua_gettable(L, LUA_GLOBALSINDEX);
lua_pushlightuserdata(L, hKey);
lua_gettable(L, -2);