Gabriel,
exactly that way: I have a "PeerTable", which uses the "light userdata" as its "key" and the corresponding Lua table as its "value".
Just don't forget to add every newly created object and remove it again when it gets garbage collected - and make the "PeerTable" weak, or you will never get rid of your objects!
exactly that way: I have a "PeerTable", which uses the "light userdata" as its "key" and the corresponding Lua table as its "value".
Just don't forget to add every newly created object and remove it again when it gets garbage collected - and make the "PeerTable" weak, or you will never get rid of your objects!