[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Lua 5.2 alpha lua_setuservalue() question
- From: Benoit Germain <bnt.germain@...>
- Date: Tue, 31 May 2011 15:36:14 +0200
Hello,
I was just wondering: is there any special reason why
lua_setuservalue() will only accept either a table or nil (according
to the manual)? I happen to have a binding where some full userdata
object of some type A is the hierarchical parent of other full
userdata objects of another type B. Given some object of type B, I
would like to be able to retrieve its parent of type A. The most
convenient way to do this is to store it in the user value. But since
I don't need anything else, I'd rather avoid to create a user value
table for each of those B objects.
--
Benoit.