]> git.sur5r.net Git - cc65/blobdiff - src/common/strpool.c
Merge remote-tracking branch 'upstream/master' into a5200
[cc65] / src / common / strpool.c
index 87cb2466b9dfeac4e9fdb1bf309d96f4736dc3fa..c5661be75bca90f807ad89015e0283455a2d6d63 100644 (file)
@@ -233,10 +233,10 @@ unsigned SP_Add (StringPool* P, const StrBuf* S)
  */
 {
     /* 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));
@@ -245,7 +245,7 @@ unsigned SP_Add (StringPool* P, const StrBuf* S)
         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);
@@ -281,6 +281,3 @@ unsigned SP_GetCount (const StringPool* P)
 {
     return CollCount (&P->Entries);
 }
-
-
-