Skip to content

Commit e84f365

Browse files
committed
fix something
1 parent 4011a56 commit e84f365

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

src/obj.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#include "lua.h"
21
#include "luavgl.h"
32
#include "private.h"
43

@@ -27,7 +26,7 @@ static void obj_delete_cb(lv_event_t *e)
2726
lua_pushnil(L);
2827
lua_setuservalue(L, -2);
2928
#else
30-
lua_getglobal(L, "_G");
29+
lua_pushglobaltable(L);
3130
lua_setuservalue(L, -2);
3231
#endif
3332

@@ -1174,8 +1173,6 @@ LUALIB_API luavgl_obj_t *luavgl_add_lobj(lua_State *L, lv_obj_t *obj)
11741173
lua_rawset(L, LUA_REGISTRYINDEX);
11751174

11761175
#if (LUA_VERSION_NUM == 501)
1177-
lua_pushlightuserdata(L, obj);
1178-
lua_rawget(L, LUA_REGISTRYINDEX);
11791176
lua_newtable(L);
11801177
lua_setuservalue(L, -2);
11811178
#endif

0 commit comments

Comments
 (0)