? xdgmime-private-funcs.patch Index: xdgmime/xdgmime.c =================================================================== RCS file: /cvs/gnome/beagle/glue/xdgmime/xdgmime.c,v retrieving revision 1.1 diff -u -p -u -r1.1 xdgmime.c --- xdgmime/xdgmime.c 13 Jan 2006 20:19:41 -0000 1.1 +++ xdgmime/xdgmime.c 17 May 2006 21:10:05 -0000 @@ -618,8 +618,8 @@ xdg_mime_unalias_mime_type (const char * } int -xdg_mime_mime_type_equal (const char *mime_a, - const char *mime_b) +_xdg_mime_mime_type_equal (const char *mime_a, + const char *mime_b) { const char *unalias_a, *unalias_b; @@ -635,6 +635,15 @@ xdg_mime_mime_type_equal (const char *mi } int +xdg_mime_mime_type_equal (const char *mime_a, + const char *mime_b) +{ + xdg_mime_init (); + + return _xdg_mime_mime_type_equal (mime_a, mime_b); +} + +int xdg_mime_media_type_equal (const char *mime_a, const char *mime_b) { @@ -668,14 +677,12 @@ xdg_mime_is_super_type (const char *mime #endif int -xdg_mime_mime_type_subclass (const char *mime, - const char *base) +_xdg_mime_mime_type_subclass (const char *mime, + const char *base) { const char *umime, *ubase; const char **parents; - xdg_mime_init (); - if (_caches) return _xdg_mime_cache_mime_type_subclass (mime, base); @@ -708,6 +715,15 @@ xdg_mime_mime_type_subclass (const char } return 0; +} + +int +xdg_mime_mime_type_subclass (const char *mime, + const char *base) +{ + xdg_mime_init (); + + return _xdg_mime_mime_type_subclass (mime, base); } char ** Index: xdgmime/xdgmime.h =================================================================== RCS file: /cvs/gnome/beagle/glue/xdgmime/xdgmime.h,v retrieving revision 1.1 diff -u -p -u -r1.1 xdgmime.h --- xdgmime/xdgmime.h 13 Jan 2006 20:19:41 -0000 1.1 +++ xdgmime/xdgmime.h 17 May 2006 21:10:05 -0000 @@ -95,6 +95,12 @@ int xdg_mime_register_reload_ca XdgMimeDestroy destroy); void xdg_mime_remove_callback (int callback_id); + /* Private versions of functions that don't call xdg_mime_init () */ +int _xdg_mime_mime_type_equal (const char *mime_a, + const char *mime_b); +int _xdg_mime_mime_type_subclass (const char *mime, + const char *base); + #ifdef __cplusplus } #endif /* __cplusplus */ Index: xdgmime/xdgmimemagic.c =================================================================== RCS file: /cvs/gnome/beagle/glue/xdgmime/xdgmimemagic.c,v retrieving revision 1.2 diff -u -p -u -r1.2 xdgmimemagic.c --- xdgmime/xdgmimemagic.c 29 Mar 2006 21:46:06 -0000 1.2 +++ xdgmime/xdgmimemagic.c 17 May 2006 21:10:05 -0000 @@ -671,7 +671,7 @@ _xdg_mime_magic_lookup_data (XdgMimeMagi if (_xdg_mime_magic_match_compare_to_data (match, data, len)) { if (!had_match || match->priority > priority || - (mime_type != NULL && xdg_mime_mime_type_subclass (match->mime_type, mime_type))) + (mime_type != NULL && _xdg_mime_mime_type_subclass (match->mime_type, mime_type))) { mime_type = match->mime_type; priority = match->priority; @@ -688,7 +688,7 @@ _xdg_mime_magic_lookup_data (XdgMimeMagi for (n = 0; n < n_mime_types; n++) { if (mime_types[n] && - xdg_mime_mime_type_equal (mime_types[n], match->mime_type)) + _xdg_mime_mime_type_equal (mime_types[n], match->mime_type)) mime_types[n] = NULL; } }