[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: On lua5 and embedding
- From: Michael Naunton <mmn@...>
- Date: Tue, 28 Jan 2003 22:49:30 -0500
I'd like enlightenment too. I currently just punted and wrote a C++
wrapper template to push userdata as a T*, classTag pair. That way I can
at least allocate my real data in mempools, etc, and vector GC stuff to
the real class. Ugly as hell, but at least the ugliness is contained.
>I guess the "light-weight" userdata is to ease the burden on Lua's
>internals whenever necessasry, i.e., no meta table bookkeeping
>However, my biggest complaint of lua5 is now there seems no way to
>define a "heavy-weight" userdata without using Lua's memory allocation
>method. I can no longer define a GC method for pure C pointers.
>When it occurred to me almost impossible to convert my program to
>Lua5, I'd still stick with Lua4 for now.
>Or I could be wrong on this, can somebody enlighten me please?