[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: directly accesing c++ class members
- From: Peter Shook <pshook@...>
- Date: Sat, 17 May 2003 10:57:12 -0400
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?