We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4011a56 commit e84f365Copy full SHA for e84f365
1 file changed
src/obj.c
@@ -1,4 +1,3 @@
1
-#include "lua.h"
2
#include "luavgl.h"
3
#include "private.h"
4
@@ -27,7 +26,7 @@ static void obj_delete_cb(lv_event_t *e)
27
26
lua_pushnil(L);
28
lua_setuservalue(L, -2);
29
#else
30
- lua_getglobal(L, "_G");
+ lua_pushglobaltable(L);
31
32
#endif
33
@@ -1174,8 +1173,6 @@ LUALIB_API luavgl_obj_t *luavgl_add_lobj(lua_State *L, lv_obj_t *obj)
1174
1173
lua_rawset(L, LUA_REGISTRYINDEX);
1175
1176
#if (LUA_VERSION_NUM == 501)
1177
- lua_pushlightuserdata(L, obj);
1178
- lua_rawget(L, LUA_REGISTRYINDEX);
1179
lua_newtable(L);
1180
1181
0 commit comments