lua-users home
lua-l archive

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



On 2-Feb-07, at 2:15 PM, Zé Pedro wrote:

I don't think I made myself clear. What happens is that the function in C++ that is called from lua can receive different types of userdata. When I do luaL_checkudata I have to say what kind of userdata I'm going to read. What I want to do is to check what kind of userdata was sent from Lua.

Yes, I understood that. My suggestion is that you put something in the metatable when you create it, so that you can later get that information back out of the metatable of the argument to the cfunction.