コード例 #1
0
ファイル: LuaValue.cs プロジェクト: edmundmk/apollua
        internal static bool MetaEquals(LuaValue left, LuaValue right)
        {
            if (left == null || right == null)
            {
                return(left == right);
            }
            if (left.LuaType != right.LuaType)
            {
                return(false);
            }
            if (left.RawEquals(right))
            {
                return(true);
            }

            LuaValue h = GetComparisonHandler(left, right, "__eq");

            if (h != null)
            {
                LuaValue result = h.Call(left, right);
                return((bool)result);
            }

            return(false);
        }