more hash code simplifications.
[apps/madmutt.git] / lib-mx / mx.c
index 1d6ebf1..3aaff52 100644 (file)
@@ -552,9 +552,9 @@ void mx_fastclose_mailbox (CONTEXT * ctx)
   if (MX_IDX(ctx->magic-1) && mxfmts[ctx->magic-1]->mx_fastclose_mailbox)
     mxfmts[ctx->magic-1]->mx_fastclose_mailbox(ctx);
   if (ctx->subj_hash)
-    hash_destroy (&ctx->subj_hash, NULL);
+    hash_delete (&ctx->subj_hash, NULL);
   if (ctx->id_hash)
-    hash_destroy (&ctx->id_hash, NULL);
+    hash_delete (&ctx->id_hash, NULL);
   mutt_clear_threads (ctx);
   for (i = 0; i < ctx->msgcount; i++)
     header_delete(&ctx->hdrs[i]);
@@ -906,10 +906,10 @@ void mx_update_tables (CONTEXT * ctx, int committing)
                       ctx->hdrs[i]->content->hdr_offset);
       /* remove message from the hash tables */
       if (ctx->subj_hash && ctx->hdrs[i]->env->real_subj)
-        hash_delete (ctx->subj_hash, ctx->hdrs[i]->env->real_subj,
+        hash_remove (ctx->subj_hash, ctx->hdrs[i]->env->real_subj,
                      ctx->hdrs[i], NULL);
       if (ctx->id_hash && ctx->hdrs[i]->env->message_id)
-        hash_delete (ctx->id_hash, ctx->hdrs[i]->env->message_id,
+        hash_remove (ctx->id_hash, ctx->hdrs[i]->env->message_id,
                      ctx->hdrs[i], NULL);
       header_delete(&ctx->hdrs[i]);
     }
@@ -1269,10 +1269,10 @@ void mx_update_context (CONTEXT * ctx, int new_messages)
 
     /* add this message to the hash tables */
     if (ctx->id_hash && h->env->message_id)
-      hash_insert (ctx->id_hash, h->env->message_id, h, 0);
+      hash_insert (ctx->id_hash, h->env->message_id, h);
     if (!ctx->counting) {
       if (ctx->subj_hash && h->env->real_subj)
-        hash_insert (ctx->subj_hash, h->env->real_subj, h, 1);
+        hash_insert (ctx->subj_hash, h->env->real_subj, h);
 
       if (option (OPTSCORE))
         mutt_score_message (ctx, h, 0);