fts1_hash.c File Reference

Go to the source code of this file.

Functions

static void * malloc_and_zero (int n)
void sqlite3Fts1HashInit (fts1Hash *pNew, int keyClass, int copyKey)
void sqlite3Fts1HashClear (fts1Hash *pH)
static int strHash (const void *pKey, int nKey)
static int strCompare (const void *pKey1, int n1, const void *pKey2, int n2)
static int binHash (const void *pKey, int nKey)
static int binCompare (const void *pKey1, int n1, const void *pKey2, int n2)
static int(*)(const void *, int) hashFunction (int keyClass)
static int(*)(const void
*, int, const void *, int) 
compareFunction (int keyClass)
static void insertElement (fts1Hash *pH, struct _fts1ht *pEntry, fts1HashElem *pNew)
static void rehash (fts1Hash *pH, int new_size)
static fts1HashElemfindElementGivenHash (const fts1Hash *pH, const void *pKey, int nKey, int h)
static void removeElementGivenHash (fts1Hash *pH, fts1HashElem *elem, int h)
void * sqlite3Fts1HashFind (const fts1Hash *pH, const void *pKey, int nKey)
void * sqlite3Fts1HashInsert (fts1Hash *pH, const void *pKey, int nKey, void *data)

Function Documentation

static int binCompare ( const void *  pKey1,
int  n1,
const void *  pKey2,
int  n2 
) [static]

Definition at line 118 of file fts1_hash.c.

Referenced by compareFunction().

static int binHash ( const void *  pKey,
int  nKey 
) [static]

Definition at line 110 of file fts1_hash.c.

Referenced by hashFunction().

static int(*)(const void*, int, const void*, int) compareFunction ( int  keyClass  )  [static]

Definition at line 150 of file fts1_hash.c.

References binCompare(), FTS1_HASH_BINARY, FTS1_HASH_STRING, and strCompare().

Referenced by findElementGivenHash().

static fts1HashElem* findElementGivenHash ( const fts1Hash pH,
const void *  pKey,
int  nKey,
int  h 
) [static]
static int(*)(const void*, int) hashFunction ( int  keyClass  )  [static]

Definition at line 135 of file fts1_hash.c.

References binHash(), FTS1_HASH_BINARY, FTS1_HASH_STRING, and strHash().

Referenced by rehash(), sqlite3Fts1HashFind(), and sqlite3Fts1HashInsert().

static void insertElement ( fts1Hash pH,
struct _fts1ht *  pEntry,
fts1HashElem pNew 
) [static]

Definition at line 161 of file fts1_hash.c.

References fts1Hash::first, fts1HashElem::next, and fts1HashElem::prev.

Referenced by rehash(), and sqlite3Fts1HashInsert().

static void* malloc_and_zero ( int  n  )  [static]

Definition at line 34 of file fts1_hash.c.

Referenced by sqlite3Fts1HashInit().

static void rehash ( fts1Hash pH,
int  new_size 
) [static]
static void removeElementGivenHash ( fts1Hash pH,
fts1HashElem elem,
int  h 
) [static]
void sqlite3Fts1HashClear ( fts1Hash pH  ) 
void* sqlite3Fts1HashFind ( const fts1Hash pH,
const void *  pKey,
int  nKey 
)
void sqlite3Fts1HashInit ( fts1Hash pNew,
int  keyClass,
int  copyKey 
)
void* sqlite3Fts1HashInsert ( fts1Hash pH,
const void *  pKey,
int  nKey,
void *  data 
)
static int strCompare ( const void *  pKey1,
int  n1,
const void *  pKey2,
int  n2 
) [static]

Definition at line 102 of file fts1_hash.c.

Referenced by compareFunction().

static int strHash ( const void *  pKey,
int  nKey 
) [static]

Definition at line 92 of file fts1_hash.c.

Referenced by hashFunction().


ContextLogger2—ContextLogger2 Logger Daemon Internals—Generated on Mon May 2 13:49:58 2011 by Doxygen 1.6.1