From 54e9dc271d9af366a154b80063754c0a713e8de0 Mon Sep 17 00:00:00 2001 From: vsc Date: Mon, 18 Jun 2001 18:33:20 +0000 Subject: [PATCH] fix == at top-level git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@91 b08c6af1-5177-4d33-ba66-4b1c6b8b522a --- C/unify.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/C/unify.c b/C/unify.c index 9a9f45800..f1c55cc4a 100644 --- a/C/unify.c +++ b/C/unify.c @@ -1238,6 +1238,22 @@ p_eq(void) if (f0 != f1) { return(FALSE); } + if (IsExtensionFunctor(f0)) { + switch ((CELL)f0) { + case (CELL)FunctorDBRef: + return (d0 == d1); + case (CELL)FunctorLongInt: + return(LongIntOfTerm(d0) == LongIntOfTerm(d1)); +#ifdef USE_GMP + case (CELL)FunctorBigInt: + return (mpz_cmp(BigIntOfTerm(d0), BigIntOfTerm(d1)) == 0); +#endif + case (CELL)FunctorDouble: + return(FloatOfTerm(d0) == FloatOfTerm(d1)); + default: + return(FALSE); + } + } return(iequ_complex(RepAppl(d0), RepAppl(d0)+ArityOfFunctor(f0), RepAppl(d1))); } return(FALSE);