avoid sideffects from MkBigInt

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1524 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc
2006-01-18 15:34:54 +00:00
parent 1c77e3cf32
commit 745fed2679
11 changed files with 37 additions and 49 deletions

View File

@@ -44,15 +44,19 @@ EvalToTerm(blob_type bt, union arith_ret *res)
{
switch (bt) {
case long_int_e:
return(MkIntegerTerm(res->Int));
return MkIntegerTerm(res->Int);
case double_e:
return(MkFloatTerm(res->dbl));
return MkFloatTerm(res->dbl);
#ifdef USE_GMP
case big_int_e:
return(Yap_MkBigIntTerm(res->big));
{
Term t = Yap_MkBigIntTerm(res->big);
mpz_clear(res->big);
return t;
}
#endif
default:
return(TermNil);
return TermNil;
}
}