[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Full userdata and metamethods (mail resent)
- From: Duncan Cross <duncan.cross@...>
- Date: Mon, 9 Nov 2009 20:49:28 +0000
On Mon, Nov 9, 2009 at 8:41 PM, liam mail <email@example.com> wrote:
> Duncan you are correct that in pushing the function twice they are not equal
> (checked using lua_rawequal which seems strange); yet pushing the function
> once then using push_value whilst they are raw equal as you would expect
> still does not call the function.
My final observation in the code is another boolean/number problem
right at the end, when you get the result:
> int result = lua_tointeger(s,-1);
...this should be lua_toboolean() instead. lua_tointeger() will return
0 for either boolean value.