use new stringshared hash, pointer was being misused since api is confusing.
authorbarbieri <barbieri@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 19 Jun 2009 15:00:38 +0000 (15:00 +0000)
committerbarbieri <barbieri@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 19 Jun 2009 15:00:38 +0000 (15:00 +0000)
The pointer type is really confusing, it was expecting pointer to
pointer what is really weird.

Cedric just added a stringshared variant that should be as fast
(removing the strcmp()) and is the api one would expect.

This fix a long standing bug I introduced (sorry!) when added the
cache, but it was bit hard to hit as if you didn't find a collision
you'd be adding to cache and never finding it. But I recently started
to use icons on desktop and for some weird reason the PDF icons
started to show in TAR :-P

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/efreet@41113 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/efreet_mime.c

index 07b6b4c..4d24b35 100644 (file)
@@ -366,7 +366,7 @@ efreet_mime_type_cache_clear(void)
         eina_hash_free(mime_icons);
         mime_icons_lru = NULL;
     }
-    mime_icons = eina_hash_pointer_new(EINA_FREE_CB(efreet_mime_icon_entry_head_free));
+    mime_icons = eina_hash_stringshared_new(EINA_FREE_CB(efreet_mime_icon_entry_head_free));
 }
 
 EAPI void