lua-users home
lua-l archive

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


Hi

Is there some "lua way" how to use the luaL_newmetatable functionality in
combination with userdatas that need an individual metatable?

In my case, I'd like to store a table together with the userdata to keep some
lua variables that can be modified by the user. I thought about storing this
table in the userdata's metatable. However, that model requires individual
metatables for each userdata. However, this couldn't be used in combination
with these functions. I could of course also use a table in the registry (or
the metatable), using the userdata as keys. 

What would you suggest?

Eike