[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: checking userdata type from lua
- From: "Alex Queiroz" <asandroq@...>
- Date: Thu, 18 May 2006 09:52:03 -0300
On 5/18/06, Daniel Collins <firstname.lastname@example.org> wrote:
> You can do what luaL_checkudata does: check if the
> object's metatable is equal to the metatable of the "type".
Yes, but the metatable for the type is stored in the registry and I
thought that was only accessible from the C API.
Sure, you'd have to make it accessible from Lua as well, maybe in
a global table.