[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Using luaL_newmetatable / luaL_checkudata
- From: Eike Decker <eike@...>
- Date: Sun, 1 Jun 2008 11:52:53 +0200
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