Portability: Let indexFor be a define instead of an inline function

This commit is contained in:
Joel Rosdahl 2010-02-27 23:27:48 +01:00
parent 1783d5fd43
commit f6ac19d570

View File

@ -29,10 +29,7 @@ hash(struct hashtable *h, void *k);
/*****************************************************************************/
/* indexFor */
static inline unsigned int
indexFor(unsigned int tablelength, unsigned int hashvalue) {
return (hashvalue % tablelength);
}
#define indexFor(tablelength, hashvalue) ((hashvalue) % (tablelength))
/* Only works if tablelength == 2^N */
/*static inline unsigned int