[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Userdata example for 5.2.2
- From: Garthy <garthy_aul@...>
- Date: Wed, 17 Apr 2013 13:53:06 +0930
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