On Mon, Nov 9, 2009 at 9:01 PM, liam mail <
liam.list@googlemail.com> wrote:
> 2009/11/9 Duncan Cross <
duncan.cross@gmail.com>
>> On Mon, Nov 9, 2009 at 8:41 PM, liam mail <
liam.list@googlemail.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.
>>
>> -Duncan
>
> Yes another good catch, unfortunately the code I posted was to verify the
> result I was seeing using binding code which was pushing and pulling
> booleans. I feel this would not stop the function being called yet have
> adjusted the code and will inline it below for fullness.
Okay, I have finally tried actually *running* the code :) In three