lua-users home
lua-l archive

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


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)