[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Converting lightuserdata to self
- From: Christopher Eykamp <chris@...>
- Date: Tue, 23 Feb 2010 09:35:44 -0800
On 2/22/2010 3:03 AM, Drake Wilson wrote:
Yes, I think that will work. My main problem was that it wasn't listed
in the PiL index :-)
Quoth Christopher Eykamp<email@example.com>, on 2010-02-22 02:33:05 -0800:
I am developing a Lua event handling framework loosely based on the
Lua Gems sample. The main game is in C++, and I am tying them
together with Lunar. My problem is I need some way to pass a "self"
object from C++ to my Lua code.
First hit for "lunar lua c++" on the Web shows up as
> From that:
| lunar.h has two extra public methods: push and call.
| push receives a pointer to an object and pushes a unique  userdata
| onto the stack, and returns the stack index of this userdata. An
| optional second parameter specifies whether or not to delete the
| object when the userdata gc event occurs. The default for this
| parameter is false which means the object won't be deleted.
Is that not working for you for some reason?
---> Drake Wilson
Thanks for your help!