]> git.notmuchmail.org Git - notmuch/blobdiff - lib/message-file.c
util: move strcase_equal and strcase_hash to util
[notmuch] / lib / message-file.c
index 8ac96e8e06a5dd9a132f241469690c773777fdb4..ee305202fffa63f0e1a1d024c738a1d69a39ebb4 100644 (file)
@@ -37,27 +37,6 @@ struct _notmuch_message_file {
     GMimeMessage *message;
 };
 
-static int
-strcase_equal (const void *a, const void *b)
-{
-    return strcasecmp (a, b) == 0;
-}
-
-static unsigned int
-strcase_hash (const void *ptr)
-{
-    const char *s = ptr;
-
-    /* This is the djb2 hash. */
-    unsigned int hash = 5381;
-    while (s && *s) {
-       hash = ((hash << 5) + hash) + tolower (*s);
-       s++;
-    }
-
-    return hash;
-}
-
 static int
 _notmuch_message_file_destructor (notmuch_message_file_t *message)
 {