[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: how does GC work with complex expressions using metamethods?
- From: Doug Currie <doug.currie@...>
- Date: Sun, 16 Aug 2009 15:02:34 -0400
On Aug 16, 2009, at 2:54 PM, Michael Newberry wrote:
No, I returned both lightuserdata and the metatable containing the
GC method.
You did not return (full) userdata. You returned lightuserdata. We are
all telling you, over and over again, this won't work.
I also tried returning the pointer to the userdata using
lua_pushlightuserdata and that made no difference.
lua_pushlightuserdata does not return (full) userdata.
lua_newuserdata pushes the (full) userdata on the Lua stack. That is
what you need to return from your function.
Remember I am returning two values, and I am assigning the second
value to a table element back in the lua code. The two return values
are stored in a table which I has setup as a class.
That doesn't help since neither is the (full) userdata you need to
store.
e
- References:
- how does GC work with complex expressions using metamethods?, Michael Newberry
- Re: how does GC work with complex expressions using metamethods?, Javier Guerra
- Re: how does GC work with complex expressions using metamethods?, Michael Newberry
- Re: how does GC work with complex expressions using metamethods?, Peter Loveday
- Re: how does GC work with complex expressions using metamethods?, Michael Newberry
- Re: how does GC work with complex expressions using metamethods?, Michael Newberry
- Re: how does GC work with complex expressions using metamethods?, Sam Roberts
- Re: how does GC work with complex expressions using metamethods?, Michael Newberry
- Re: how does GC work with complex expressions using metamethods?, David Given
- Re: how does GC work with complex expressions using metamethods?, Sam Roberts
- Re: how does GC work with complex expressions using metamethods?, Michael Newberry
- Re: how does GC work with complex expressions using metamethods?, Doug Currie
- Re: how does GC work with complex expressions using metamethods?, Michael Newberry