On Mon, Nov 9, 2009 at 7:22 PM, liam mail <email@example.com
> I have come across something that I am unsure if it is expected behaviour or
> a bug and would like some help to identify which it is.
> int equal(lua_State* s)I believe that the __eq metamethod (as well as the other comparison
> Int_wrapper* i1 = static_cast<Int_wrapper *>( lua_touserdata(s, 1) );
> Int_wrapper* i2 = static_cast<Int_wrapper *>( lua_touserdata(s, 2) );
> lua_pushinteger(s, i1->i == i2->i ? 1 : 0 );
> return 1;
metamethods) must return a boolean in order to work properly, so that
may be your problem.