lua-users home
lua-l archive

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



On 4-Dec-07, at 10:15 AM, Tom Miles wrote:

Hi there,

I've been trying to add some form of type safety with my use of
representing pointers in my C++ app with lightuserdata, using
lua_newmetatable, and luaL_checkuserdata etc.  This works in most
instances, but I have an odd situation that I don't know what to do
about.

Light userdata don't have individual metatables. So I don't see how
you can get that to work with luaL_checkuserdata,

You should probably use full userdata, particularly if type safety
is important.