|
It was thus said that the Great liam mail once stated:
>Be careful, because that isn't always true. I wrote code to bind Xlib to
> I agree with Justin here for userdata types, in fact a certain library[1]
> does not even know the types of userdata[2] in C++ which is not so
> unusual[3]. If you really wanted to check the type then using the debug
> library seems very very wrong to me; just don't set a __metatable entry to
> hide it, grab the metatable and check against the type you want.
Lua [4], and each userdata created gets its own distinct metatable. [5] Of
course, that metatable has a _TYPE field associated with it ...