Template
1
0
mirror of https://github.com/bol-van/zapret2.git synced 2026-03-14 06:13:09 +00:00

nfqws2: use __close in lua 5.5

This commit is contained in:
bol-van
2026-01-20 11:03:28 +03:00
parent fb3bdd9b70
commit 848221b096

View File

@@ -2687,6 +2687,9 @@ static void lua_mt_init_zstream(lua_State *L)
luaL_newmetatable(L, "userdata_zstream");
lua_pushcfunction(L, lua_cfunc_zstream_gc);
lua_setfield(L, -2, "__gc");
// Lua 5.5+ to-be-closed var
lua_pushcfunction(L, lua_cfunc_zstream_gc);
lua_setfield(L, -2, "__close");
lua_pop(L,1);
LUA_STACK_GUARD_LEAVE(L, 0)