*/
{
/* Search for a matching entry in the hash table */
- StringPoolEntry* E = HT_FindEntry (&P->Tab, S);
+ StringPoolEntry* E = HT_Find (&P->Tab, S);
/* Did we find it? */
- if (E != 0) {
+ if (E == 0) {
/* We didn't find the entry, so create a new one */
E = NewStringPoolEntry (S, CollCount (&P->Entries));
CollAppend (&P->Entries, E);
/* Insert the new entry into the hash table */
- HT_InsertEntry (&P->Tab, E);
+ HT_Insert (&P->Tab, E);
/* Add up the string size */
P->TotalSize += SB_GetLen (&E->Buf);
{
return CollCount (&P->Entries);
}
-
-
-