|
> I'd rather not have to go through > > blob = lua_newuserdata(...); > lua_setglobal(L,"dummy"); > ... > lua_getglobal(L,"dummy"); If that's your code, then you can use lua_pushvalue(L,-1) just before lua_setglobal to leave another instance of the same udata on the stack.