support new interface between YAP and GMP, so that we don't rely on our own
allocation routines. Several big fixes. git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1490 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
@@ -224,10 +224,12 @@ read_int_overflow(const char *s, Int base, Int val)
|
||||
{
|
||||
#ifdef USE_GMP
|
||||
/* try to scan it as a bignum */
|
||||
MP_INT *new = Yap_PreAllocBigNum();
|
||||
mpz_t new;
|
||||
Term t;
|
||||
|
||||
mpz_init_set_str (new, s, base);
|
||||
return(Yap_MkBigIntTerm(new));
|
||||
t = Yap_MkBigIntTerm(new);
|
||||
return t;
|
||||
#else
|
||||
/* try to scan it as a float */
|
||||
return(MkIntegerTerm(val));
|
||||
|
Reference in New Issue
Block a user