fts2_hash.c File Reference

Go to the source code of this file.

Functions

static void * fts2HashMalloc (int n)
static void fts2HashFree (void *p)
void sqlite3Fts2HashInit (fts2Hash *pNew, int keyClass, int copyKey)
void sqlite3Fts2HashClear (fts2Hash *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 (fts2Hash *pH, struct _fts2ht *pEntry, fts2HashElem *pNew)
static void rehash (fts2Hash *pH, int new_size)
static fts2HashElemfindElementGivenHash (const fts2Hash *pH, const void *pKey, int nKey, int h)
static void removeElementGivenHash (fts2Hash *pH, fts2HashElem *elem, int h)
void * sqlite3Fts2HashFind (const fts2Hash *pH, const void *pKey, int nKey)
void * sqlite3Fts2HashInsert (fts2Hash *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 123 of file fts2_hash.c.

Referenced by compareFunction().

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

Definition at line 115 of file fts2_hash.c.

Referenced by hashFunction().

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

Definition at line 155 of file fts2_hash.c.

References binCompare(), FTS2_HASH_BINARY, FTS2_HASH_STRING, and strCompare().

Referenced by findElementGivenHash().

static fts2HashElem* findElementGivenHash ( const fts2Hash pH,
const void *  pKey,
int  nKey,
int  h 
) [static]
static void fts2HashFree ( void *  p  )  [static]

Definition at line 45 of file fts2_hash.c.

References sqlite3_free().

Referenced by rehash(), removeElementGivenHash(), sqlite3Fts2HashClear(), and sqlite3Fts2HashInsert().

static void* fts2HashMalloc ( int  n  )  [static]

Definition at line 38 of file fts2_hash.c.

References sqlite3_malloc().

Referenced by rehash(), and sqlite3Fts2HashInsert().

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

Definition at line 140 of file fts2_hash.c.

References binHash(), FTS2_HASH_BINARY, FTS2_HASH_STRING, and strHash().

Referenced by rehash(), sqlite3Fts2HashFind(), and sqlite3Fts2HashInsert().

static void insertElement ( fts2Hash pH,
struct _fts2ht *  pEntry,
fts2HashElem pNew 
) [static]

Definition at line 166 of file fts2_hash.c.

References fts2Hash::first, fts2HashElem::next, and fts2HashElem::prev.

Referenced by rehash(), and sqlite3Fts2HashInsert().

static void rehash ( fts2Hash pH,
int  new_size 
) [static]
static void removeElementGivenHash ( fts2Hash pH,
fts2HashElem elem,
int  h 
) [static]
void sqlite3Fts2HashClear ( fts2Hash pH  ) 
void* sqlite3Fts2HashFind ( const fts2Hash pH,
const void *  pKey,
int  nKey 
)
void sqlite3Fts2HashInit ( fts2Hash pNew,
int  keyClass,
int  copyKey 
)
void* sqlite3Fts2HashInsert ( fts2Hash 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 107 of file fts2_hash.c.

Referenced by compareFunction().

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

Definition at line 97 of file fts2_hash.c.

Referenced by hashFunction().


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