return 0;
}
- FreeMe = Hash->Members[At->Position];
- Hash->Members[At->Position] = NULL;
+ FreeMe = Hash->Members[Hash->LookupTable[At->Position]->Position];
+ Hash->Members[Hash->LookupTable[At->Position]->Position] = NULL;
/** delete our hashing data */
(Hash->nLookupTableItems - At->Position - 1) *
sizeof(HashKey*));
+ Hash->LookupTable[Hash->nLookupTableItems - 1] = NULL;
}
else
Hash->LookupTable[At->Position] = NULL;
if ((Hash == NULL) ||
(At < 0) ||
- (At > Hash->nLookupTableItems))
+ (At >= Hash->nLookupTableItems))
return 0;
*HKLen = Hash->LookupTable[At]->HKLen;
*HashKey = Hash->LookupTable[At]->HashKey;
*/
-/*
- * Generic function to free a pointer. This can be used as a callback with the
- * hash table, even on systems where free() is defined as a macro or has had other
- * horrible things done to it.
- */
-void generic_free_handler(void *ptr) {
- free(ptr);
-}
-
/*
* Generic function to free a reference.
* since a reference actualy isn't needed to be freed, do nothing.