Branch: Tag:

2016-12-17

2016-12-17 23:00:12 by Martin Nilsson <nilsson@fastmail.com>

Revert "No need calling isxdigit when we have our own lookup table."

This reverts commit 1c6fbc0240147c5404f31fe20309ef913782add8.

3248:   }      #define DIGIT(x) ( (x)<256 ? hexdecode[x] : 16 ) - #define ISHEX(x) (DIGIT(x)<16) +    #define MBASE ('z' - 'a' + 1 + 10)      PMOD_EXPORT long STRTOL_PCHARP(PCHARP str, PCHARP *ptr, unsigned int base)
3292:       if ((val = DIGIT(c)) >= base)    return 0; /* no number formed */ -  if (base == 16 && c == '0' && ISHEX(INDEX_PCHARP(str,2)) && +  if (base == 16 && c == '0' && isxdigit(INDEX_PCHARP(str,2)) &&    (INDEX_PCHARP(str,1) == 'x' || INDEX_PCHARP(str,1) == 'X'))    {    INC_PCHARP(str,2);
3446:    if(c == '0' &&    ((base==16 && (INDEX_PCHARP(str,1)=='x' || INDEX_PCHARP(str,1)=='X')) ||    (base==2 && (INDEX_PCHARP(str,1)=='b' || INDEX_PCHARP(str,1)=='B'))) && -  ISHEX(INDEX_PCHARP(str,2))) +  INDEX_PCHARP(str,2) < 256 && /* Don't trust isxdigit... */ +  isxdigit(INDEX_PCHARP(str,2)))    {    /* Skip over leading "0x", "0X", "0b" or "0B". */    INC_PCHARP(str,2);