Branch: Tag:

2015-02-13

2015-02-13 13:49:20 by Martin Nilsson <nilsson@opera.com>

GMP 5.0 added support for 0b and 0B as prefix for binary numbers.

351:    neg = 1;    }    -  /* We need to fix the case with binary -  * 0b101... and -0b101... numbers. -  * -  * What about hexadecimal and octal? -  * /grubba 2003-05-16 -  * -  * No sweat - they are handled by mpz_set_str. /mast + #ifndef HAVE_GMP5 +  /* mpz_set_str() will parse leading "0x" and "0X" as hex and +  * leading "0" as octal. "0b" and "0B" for binary are supported +  * from GMP 5.0.    */    if(!base && digits->len > 2)    {
369:    base = 2;    }    } + #endif    }       if (mpz_set_str(tmp, digits->str + offset, base))