lua-users home
lua-l archive

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


On 3 Dec 2013, at 22:06, Sir Pogsalot <sir.pogsalot@gmail.com> wrote:

> As far as I see it's simply for use with get/setuservalue(), to make a GC association.

I'm not sure, but I think you're asking here if there is a use of setuservalue unrelated to the GC?

As an example I have a sqlite3 memory database wrapped in a userdata. In that database I want to be able to query certain objects that exist in Lua - this is done by creating an sqlite3 virtual table that knows how to query the Lua object, the Lua objects are stored in the userdata's user value (a table) so they can be accessed by the virtual table module.

Kev