- search=search->next;
- }
-
- struct hashlistnode<_Key,_Val, _malloc, _calloc, _free> *newptr=(struct hashlistnode<_Key,_Val,_malloc,_calloc,_free> *)new struct hashlistnode<_Key,_Val, _malloc, _calloc, _free>;
- newptr->key=key;
- newptr->val=val;
- newptr->next=ptr;
- table[(((_KeyInt)key)&mask)>>_Shift]=newptr;
- }
-
- /** Put a key entry into the table. */
- _Val * ensureptr(_Key key) {
- if (size > threshold) {
- //Resize
- unsigned int newsize = capacity << 1;
- resize(newsize);
- }
-
- struct hashlistnode<_Key,_Val, _malloc, _calloc, _free> *ptr = table[(((_KeyInt)key) & mask)>>_Shift];