提交 9326d48e 编写于 作者: B Behdad Esfahbod

Don't use g_mapped_file_unref()

Was introduced in glib 2.22.
上级 e152d1a2
...@@ -61,7 +61,7 @@ main (int argc, char **argv) ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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 ...@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册