Branch: Tag:

2011-05-02

2011-05-02 01:50:19 by Per Hedbor <ph@opera.com>

Since array.c is the only place the is_more_than_one_bit function is used, and it is, unlike many of our macros, suitable for inlining, inline it.

29:    "1111111011111111";      /* Not all of these are primes, but they should be adequate */ - PMOD_EXPORT const INT32 hashprimes[32] = + const INT32 hashprimes[32] =   {    31, /* ~ 2^0 = 1 */    31, /* ~ 2^1 = 2 */
111:   }       + #if 0   /* Return the number of bits in a 32-bit integer */   PMOD_EXPORT int count_bits(unsigned INT32 x)   {
131:    bits[(x>>16) & 255] +    bits[(x>>24) & 255]);   } + #endif    - /* Return true for integers with more than one bit set */ - PMOD_EXPORT int is_more_than_one_bit(unsigned INT32 x) - { -  return !!(x & (x-1)); - } -  +    PMOD_EXPORT double my_strtod(char *nptr, char **endptr)   {    double tmp=STRTOD(nptr,endptr);
165:    return x;   }    + #if 0   /* This routine basically finds a prime number    * which is larger than 'x'    */
430:       return primes[y];   } + #endif      /*    * This rounds an integer up to the next power of two. For x a power