[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: luaL_checkudata, but for tables?
- From: Sean Conner <sean@...>
- Date: Sun, 13 Apr 2014 16:27:21 -0400
It was thus said that the Great Rena once stated:
> Is there anything like luaL_checkudata for tables? i.e. get the metatable
> of an argument, check whether it's the correct type (metatable name), and
> leave the metatable on the stack?
No, but it shouldn't be that hard to write. luaL_checkudata() is only a
dozen lines of C code, and it could be the basis for what you want.
-spc (From what I see, you remove one line, change three lines, and you
have your function)