GNOME Bugzilla – Bug 777272
archive: use GHashTable for the entries
Last modified: 2017-01-16 18:32:59 UTC
We only use entries as a set to check if a specific entry is present. Using GHashTable is simpler and avoids walking the list each time.
Created attachment 343496 [details] [review] archive: use GHashTable for the entries
Review of attachment 343496 [details] [review]: Ops, sorry I need to change the hash table to be caseless
Created attachment 343499 [details] [review] patch
Review of attachment 343499 [details] [review]: I agree, thanks! ::: libgxps/gxps-archive.c @@ +214,3 @@ + gconstpointer v2) +{ + return (g_ascii_strcasecmp(v1, v2) == 0); I don't think the () are needed here for the return. @@ +321,3 @@ { + if (path == NULL) + return FALSE; Good catch, I think it actually never happened, but we could be passing NULL to g_ascii_strcasecmp in current code.
Comment on attachment 343499 [details] [review] patch Amended and pushed, thanks for the quick review!
This problem has been fixed in the unstable development version. The fix will be available in the next major software release. You may need to upgrade your Linux distribution to obtain that newer version.