Don't use g_mapped_file_unref()

Was introduced in glib 2.22.
This commit is contained in:
Behdad Esfahbod 2013-10-10 20:04:42 +02:00
parent e152d1a278
commit 9326d48e43
5 changed files with 6 additions and 6 deletions

View File

@ -61,7 +61,7 @@ main (int argc, char **argv)
GMappedFile *mf = g_mapped_file_new (argv[1], false, NULL);
font_data = g_mapped_file_get_contents (mf);
len = g_mapped_file_get_length (mf);
destroy = (hb_destroy_func_t) g_mapped_file_unref;
destroy = (hb_destroy_func_t) g_mapped_file_free;
user_data = (void *) mf;
mm = HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE;
#else

View File

@ -59,7 +59,7 @@ main (int argc, char **argv)
GMappedFile *mf = g_mapped_file_new (argv[1], false, NULL);
font_data = g_mapped_file_get_contents (mf);
len = g_mapped_file_get_length (mf);
destroy = (hb_destroy_func_t) g_mapped_file_unref;
destroy = (hb_destroy_func_t) g_mapped_file_free;
user_data = (void *) mf;
mm = HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE;
#else

View File

@ -63,7 +63,7 @@ main (int argc, char **argv)
GMappedFile *mf = g_mapped_file_new (argv[1], false, NULL);
font_data = g_mapped_file_get_contents (mf);
len = g_mapped_file_get_length (mf);
destroy = (hb_destroy_func_t) g_mapped_file_unref;
destroy = (hb_destroy_func_t) g_mapped_file_free;
user_data = (void *) mf;
mm = HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE;
#else

View File

@ -62,7 +62,7 @@ main (int argc, char **argv)
GMappedFile *mf = g_mapped_file_new (argv[1], false, NULL);
font_data = g_mapped_file_get_contents (mf);
len = g_mapped_file_get_length (mf);
destroy = (hb_destroy_func_t) g_mapped_file_unref;
destroy = (hb_destroy_func_t) g_mapped_file_free;
user_data = (void *) mf;
mm = HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE;
#else

View File

@ -436,11 +436,11 @@ font_options_t::get_font (void) const
font_data = g_mapped_file_get_contents (mf);
len = g_mapped_file_get_length (mf);
if (len) {
destroy = (hb_destroy_func_t) g_mapped_file_unref;
destroy = (hb_destroy_func_t) g_mapped_file_free;
user_data = (void *) mf;
mm = HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE;
} else
g_mapped_file_unref (mf);
g_mapped_file_free (mf);
} else {
fail (false, "%s", error->message);
//g_error_free (error);