lua-users home
lua-l archive

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


Hi,

Uli Kusterer wrote:
> Looking at the  
> sources, I get the impression that luaL_checkudata() returns NULL for  
> subclasses of the requested type. Is there a facility to do the  
> equivalent of luaL_checkudata() but also look at metatables higher  
> up?

I have contributed a small patch for Lua 5.1 that adds support
for subclasses to luaL_checkudata() and luaL_newmetatable().
It's in the mailing list archives:

  http://lua-users.org/lists/lua-l/2005-06/msg00000.html

[Note that the archive merges multiple attachments. :-/
 You only need the part before the copyright notice.]

It should work with Lua 5.0, too (but I have not tested it).
I have no idea whether this change will make it into Lua 5.1.

Bye,
     Mike