lua-users home
lua-l archive

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


On Wed, 07 Oct 2009 09:37:18 +0300, Sean Conner <sean@conman.org> wrote:
The reason I'm using the userdata and not a lightuserdata is the former I
can attach a metatable to, which would simplify the Lua code a bit.

you _can_ set global metatable for all lightuserdata. and use
some logic in C code to detect what kind of data pointer points to, and
call appropriate functions depending on that.