lua-users home
lua-l archive

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


Peter Bradshaw wrote:
(I've only been a lua user for about a month, so I may be about to get
rudely slapped for inaccuracy).

Light userdata sounds like exactly what you want. You just push a
pointer into lua and that's what you get back.

Setting the metatable from C and then checking it seems to be the way
to ensure type safety.

Erm, Light userdatas can't have metatables.

D.

--
Daniel Silverstone                         http://www.digital-scurf.org/
PGP mail accepted and encouraged.            Key Id: 2BC8 4016 2068 7895