lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Antero Vipunen wrote:
Oh my god.

<crazy mad idea>

Another option, though it's horrendously evil. Instead of using functions directly from the packages, you use tables with their __call metamethods overridden so they behave like the functions, but they (or their metatables) contain a reference to the main module table, so that it can't be collected until all references to functions within the table have expired.

It'd be so much easier with individual metatables for functions.

</crazy mad idea>

--
Lisa
http://www.thecommune.org.uk/~lisa/