hash.c File Reference

Go to the source code of this file.

Functions

void sqlite3HashInit (Hash *pNew, int copyKey)
void sqlite3HashClear (Hash *pH)
static int strHash (const void *pKey, int nKey)
static int strCompare (const void *pKey1, int n1, const void *pKey2, int n2)
static void insertElement (Hash *pH, struct _ht *pEntry, HashElem *pNew)
static void rehash (Hash *pH, int new_size)
static HashElemfindElementGivenHash (const Hash *pH, const void *pKey, int nKey, int h)
static void removeElementGivenHash (Hash *pH, HashElem *elem, int h)
HashElemsqlite3HashFindElem (const Hash *pH, const void *pKey, int nKey)
void * sqlite3HashFind (const Hash *pH, const void *pKey, int nKey)
void * sqlite3HashInsert (Hash *pH, const void *pKey, int nKey, void *data)

Function Documentation

static HashElem* findElementGivenHash ( const Hash pH,
const void *  pKey,
int  nKey,
int  h 
) [static]

Definition at line 144 of file hash.c.

References Hash::ht, HashElem::next, HashElem::nKey, HashElem::pKey, and strCompare().

Referenced by sqlite3HashFindElem(), and sqlite3HashInsert().

static void insertElement ( Hash pH,
struct _ht *  pEntry,
HashElem pNew 
) [static]

Definition at line 81 of file hash.c.

References Hash::first, HashElem::next, and HashElem::prev.

Referenced by rehash(), and sqlite3HashInsert().

static void rehash ( Hash pH,
int  new_size 
) [static]
static void removeElementGivenHash ( Hash pH,
HashElem elem,
int  h 
) [static]
void sqlite3HashClear ( Hash pH  ) 
void* sqlite3HashFind ( const Hash pH,
const void *  pKey,
int  nKey 
)
HashElem* sqlite3HashFindElem ( const Hash pH,
const void *  pKey,
int  nKey 
)

Definition at line 209 of file hash.c.

References findElementGivenHash(), Hash::ht, Hash::htsize, and strHash().

Referenced by sqlite3HashFind().

void sqlite3HashInit ( Hash pNew,
int  copyKey 
)

Definition at line 27 of file hash.c.

References Hash::copyKey, Hash::count, Hash::first, Hash::ht, and Hash::htsize.

Referenced by openDatabase(), sqlite3SchemaFree(), and sqlite3SchemaGet().

void* sqlite3HashInsert ( Hash 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 73 of file hash.c.

References sqlite3StrNICmp().

Referenced by findElementGivenHash().

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

Definition at line 63 of file hash.c.

References sqlite3UpperToLower.

Referenced by rehash(), sqlite3HashFindElem(), and sqlite3HashInsert().


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