Skip to content

Instantly share code, notes, and snippets.

View SoniEx2's full-sized avatar

Soni L. SoniEx2

View GitHub Profile
@SoniEx2
SoniEx2 / 52emu.lua
Created September 26, 2015 19:05 — forked from katlogic/52emu.lua
local track={}
setmetatable(track,{__mode="v"})
function setmetatable52(t,mt)
if mt.__gc then
local p = newproxy(true)
track[p] = t
getmetatable(p).__gc = function(p)
local mt = debug.getmetatable(t)
if mt and rawget(mt, "__gc") then
rawget(mt, "__gc")(t)