lua-users home
lua-l archive

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



Hi,

Is there a complete example for LUA 5.2.2 that shows setup, creation, method definition, and garbage collection on userdata, similar to the example here:

http://lua-users.org/wiki/UserDataExample

The linked example won't work with 5.2.2, as it lacks "luaL_openlib" at least. Digging around suggests you have to rewrite it to use "luaL_setfuncs" "carefully". This is a bit difficult if you're not already familiar with the API. Is there a good example of this?

Cheers,
Garth