Lines Matching refs:elem
36 HashElem *elem; /* For looping over all elements of the table */ in sqlite3HashClear() local
39 elem = pH->first; in sqlite3HashClear()
44 while( elem ){ in sqlite3HashClear()
45 HashElem *next_elem = elem->next; in sqlite3HashClear()
46 sqlite3_free(elem); in sqlite3HashClear()
47 elem = next_elem; in sqlite3HashClear()
108 HashElem *elem, *next_elem; /* For looping over existing elements */ in rehash() local
134 for(elem=pH->first, pH->first=0; elem; elem = next_elem){ in rehash()
135 unsigned int h = strHash(elem->pKey) % new_size; in rehash()
136 next_elem = elem->next; in rehash()
137 insertElement(pH, &new_ht[h], elem); in rehash()
152 HashElem *elem; /* Used to loop thru the element list */ in findElementWithHash() local
161 elem = pEntry->chain; in findElementWithHash()
165 elem = pH->first; in findElementWithHash()
170 assert( elem!=0 ); in findElementWithHash()
171 if( sqlite3StrICmp(elem->pKey,pKey)==0 ){ in findElementWithHash()
172 return elem; in findElementWithHash()
174 elem = elem->next; in findElementWithHash()
184 HashElem* elem, /* The element to be removed from the pH */ in removeElementGivenHash() argument
188 if( elem->prev ){ in removeElementGivenHash()
189 elem->prev->next = elem->next; in removeElementGivenHash()
191 pH->first = elem->next; in removeElementGivenHash()
193 if( elem->next ){ in removeElementGivenHash()
194 elem->next->prev = elem->prev; in removeElementGivenHash()
198 if( pEntry->chain==elem ){ in removeElementGivenHash()
199 pEntry->chain = elem->next; in removeElementGivenHash()
204 sqlite3_free( elem ); in removeElementGivenHash()
239 HashElem *elem; /* Used to loop thru the element list */ in sqlite3HashInsert() local
244 elem = findElementWithHash(pH,pKey,&h); in sqlite3HashInsert()
245 if( elem->data ){ in sqlite3HashInsert()
246 void *old_data = elem->data; in sqlite3HashInsert()
248 removeElementGivenHash(pH,elem,h); in sqlite3HashInsert()
250 elem->data = data; in sqlite3HashInsert()
251 elem->pKey = pKey; in sqlite3HashInsert()