mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 01:26:58 +00:00
update
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@15 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
|
||||
#include "hashtable.h"
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
struct entry
|
||||
{
|
||||
@@ -19,17 +20,20 @@ struct hashtable {
|
||||
unsigned int entrycount;
|
||||
unsigned int loadlimit;
|
||||
unsigned int primeindex;
|
||||
unsigned int (*hashfn) (const void *k);
|
||||
int (*eqfn) (const void *k1, const void *k2);
|
||||
unsigned int (*hashfn) (void *k);
|
||||
int (*eqfn) (void *k1, void *k2);
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
unsigned int
|
||||
hash(struct hashtable *h, const void *k);
|
||||
hash(struct hashtable *h, void *k);
|
||||
|
||||
/*****************************************************************************/
|
||||
/* indexFor */
|
||||
#define indexFor(hashvalue, tablelength) (unsigned int)(hashvalue % tablelength)
|
||||
static __inline__ unsigned int
|
||||
indexFor(unsigned int tablelength, unsigned int hashvalue) {
|
||||
return (hashvalue % tablelength);
|
||||
}
|
||||
|
||||
/* Only works if tablelength == 2^N */
|
||||
/*static inline unsigned int
|
||||
|
Reference in New Issue
Block a user