lua-users home
lua-l archive

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



Where there is a will, there is a way. But sometimes the way can be a little scarry, and a little dangerous.

Here is an example in C:

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

I didn't add this to the Lua 5.0 version of Luna yet because:
a) I thought the OO purists would object
b) no one asked for it
c) it's a bit complicated and I wanted to keep Luna simple
   like Lenny's original design.
d) the casting is a little dangerous if you are not careful

Another alternative is to use luabind.

- Peter

Roger D. Vargas wrote:
Is possibly to modify the value of a class member passed to a lua script as an userdata?