gcontenttype: Add no-op versions of {get,set}_mime_dirs() on win32/macOS

These are here to prevent linker errors, since `gcontenttype.[ch]`
aren’t compiled on Windows or macOS.

The implementations are stubs to be filled out by someone who knows each
platform, at some point in the future.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Fixes: #1791
This commit is contained in:
Philip Withnall 2019-06-18 11:33:44 +01:00
parent 3f1a79a4fa
commit 3de1b88339
2 changed files with 30 additions and 0 deletions

View File

@ -83,6 +83,21 @@ get_registry_classes_key (const char *subdir,
return value_utf8;
}
/*< private >*/
void
g_content_type_set_mime_dirs (const gchar * const *dirs)
{
/* noop on Windows */
}
/*< private >*/
const gchar * const *
g_content_type_get_mime_dirs (void)
{
const gchar * const *mime_dirs = { NULL };
return mime_dirs;
}
gboolean
g_content_type_equals (const gchar *type1,
const gchar *type2)

View File

@ -100,6 +100,21 @@ create_cstr_from_cfstring_with_fallback (CFStringRef str,
return cstr;
}
/*< private >*/
void
g_content_type_set_mime_dirs (const gchar * const *dirs)
{
/* noop on macOS */
}
/*< private >*/
const gchar * const *
g_content_type_get_mime_dirs (void)
{
const gchar * const *mime_dirs = { NULL };
return mime_dirs;
}
gboolean
g_content_type_equals (const gchar *type1,
const gchar *type2)