Skip to content

Commit

Permalink
fixup! no pop
Browse files Browse the repository at this point in the history
  • Loading branch information
lewis6991 committed Jan 29, 2025
1 parent 535d7d3 commit 0233f38
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/work.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,15 +317,12 @@ static void luv_work_init(lua_State* L, int is_main) {

// do cleanup in main thread
if (is_main) {
lua_newuserdata(L, 0);
luaL_newmetatable(L, "luv_work.meta");
lua_pushcfunction(L, luv_work_gc);
lua_setfield(L, -2, "__gc");

lua_newuserdata(L, 0);
lua_setmetatable(L, -2);

lua_setfield(L, LUA_REGISTRYINDEX, "luv_work");
lua_pop(L, 1);
}

uv_once(&once_vmkey, luv_key_init_once);
Expand Down

0 comments on commit 0233f38

Please sign in to comment.