On Fri, May 25, 2012 at 7:24 PM, Daurnimator <quae@xxxxxxxxxxxxxxx> wrote: > Hi > > I'm wondering what the best way to have a garbage collection callback for > objects that are simply ints (eg, file descriptors) > To my chargrin, tables don't support __gc: so I can't pack values into one. > The only method I see is using dummy structs or newproxy... > > Please advise :) > > D A dummy struct sounds like the best solution to me. It's called a "boxed" value when you do it that way, and you do it specifically for reasons like this where you need stronger typing. /s/ Adam