resize(capacity << 1);
struct hashlistnode<_Key,_Val, _malloc, _calloc, _free> *ptr = table[(((_KeyInt)key) & mask)>>_Shift];
- size++;
struct hashlistnode<_Key,_Val, _malloc, _calloc, _free> *search = ptr;
while(search!=NULL) {
newptr->val=val;
newptr->next=ptr;
table[(((_KeyInt)key)&mask)>>_Shift]=newptr;
+ size++;
}
/** Put a key entry into the table. */
resize(capacity << 1);
struct hashlistnode<_Key,_Val, _malloc, _calloc, _free> *ptr = table[(((_KeyInt)key) & mask)>>_Shift];
- size++;
struct hashlistnode<_Key,_Val, _malloc, _calloc, _free> *search = ptr;
while(search!=NULL) {
newptr->key=key;
newptr->next=ptr;
table[(((_KeyInt)key)&mask)>>_Shift]=newptr;
+ size++;
return &newptr->val;
}