Don't use g_mapped_file_unref()
Was introduced in glib 2.22.
This commit is contained in:
parent
e152d1a278
commit
9326d48e43
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user