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);
|
GMappedFile *mf = g_mapped_file_new (argv[1], false, NULL);
|
||||||
font_data = g_mapped_file_get_contents (mf);
|
font_data = g_mapped_file_get_contents (mf);
|
||||||
len = g_mapped_file_get_length (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;
|
user_data = (void *) mf;
|
||||||
mm = HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE;
|
mm = HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE;
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -59,7 +59,7 @@ main (int argc, char **argv)
|
||||||
GMappedFile *mf = g_mapped_file_new (argv[1], false, NULL);
|
GMappedFile *mf = g_mapped_file_new (argv[1], false, NULL);
|
||||||
font_data = g_mapped_file_get_contents (mf);
|
font_data = g_mapped_file_get_contents (mf);
|
||||||
len = g_mapped_file_get_length (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;
|
user_data = (void *) mf;
|
||||||
mm = HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE;
|
mm = HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE;
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -63,7 +63,7 @@ main (int argc, char **argv)
|
||||||
GMappedFile *mf = g_mapped_file_new (argv[1], false, NULL);
|
GMappedFile *mf = g_mapped_file_new (argv[1], false, NULL);
|
||||||
font_data = g_mapped_file_get_contents (mf);
|
font_data = g_mapped_file_get_contents (mf);
|
||||||
len = g_mapped_file_get_length (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;
|
user_data = (void *) mf;
|
||||||
mm = HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE;
|
mm = HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE;
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -62,7 +62,7 @@ main (int argc, char **argv)
|
||||||
GMappedFile *mf = g_mapped_file_new (argv[1], false, NULL);
|
GMappedFile *mf = g_mapped_file_new (argv[1], false, NULL);
|
||||||
font_data = g_mapped_file_get_contents (mf);
|
font_data = g_mapped_file_get_contents (mf);
|
||||||
len = g_mapped_file_get_length (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;
|
user_data = (void *) mf;
|
||||||
mm = HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE;
|
mm = HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE;
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -436,11 +436,11 @@ font_options_t::get_font (void) const
|
||||||
font_data = g_mapped_file_get_contents (mf);
|
font_data = g_mapped_file_get_contents (mf);
|
||||||
len = g_mapped_file_get_length (mf);
|
len = g_mapped_file_get_length (mf);
|
||||||
if (len) {
|
if (len) {
|
||||||
destroy = (hb_destroy_func_t) g_mapped_file_unref;
|
destroy = (hb_destroy_func_t) g_mapped_file_free;
|
||||||
user_data = (void *) mf;
|
user_data = (void *) mf;
|
||||||
mm = HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE;
|
mm = HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE;
|
||||||
} else
|
} else
|
||||||
g_mapped_file_unref (mf);
|
g_mapped_file_free (mf);
|
||||||
} else {
|
} else {
|
||||||
fail (false, "%s", error->message);
|
fail (false, "%s", error->message);
|
||||||
//g_error_free (error);
|
//g_error_free (error);
|
||||||
|
|
Loading…
Reference in New Issue