[gtkhtml] Work around deprecation of g_mapped_file_free().



commit 2f5786fefbbf350359d60977ea4033da03203f3d
Author: Matthew Barnes <mbarnes redhat com>
Date:   Fri Jun 19 10:52:41 2009 -0400

    Work around deprecation of g_mapped_file_free().
    
    Fixes compilation errors when building against latest GLib.
    This is a temporary fix until GLib 2.22 is released.

 components/editor/gtkhtml-editor.c         |    4 ++++
 components/editor/gtkhtml-spell-language.c |    4 ++++
 2 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/components/editor/gtkhtml-editor.c b/components/editor/gtkhtml-editor.c
index 1fe6947..48ab7a3 100644
--- a/components/editor/gtkhtml-editor.c
+++ b/components/editor/gtkhtml-editor.c
@@ -239,7 +239,11 @@ editor_url_requested_cb (GtkhtmlEditor *editor,
 		g_mapped_file_get_contents (mapped_file),
 		g_mapped_file_get_length (mapped_file));
 
+#if GLIB_CHECK_VERSION(2,21,3)
+	g_mapped_file_unref (mapped_file);
+#else
 	g_mapped_file_free (mapped_file);
+#endif
 
 exit:
 	if (error == NULL)
diff --git a/components/editor/gtkhtml-spell-language.c b/components/editor/gtkhtml-spell-language.c
index 6785fa3..82f77ec 100644
--- a/components/editor/gtkhtml-spell-language.c
+++ b/components/editor/gtkhtml-spell-language.c
@@ -141,7 +141,11 @@ iso_codes_parse (const GMarkupParser *parser,
 		g_markup_parse_context_parse (
 			context, contents, length, &error);
 		g_markup_parse_context_free (context);
+#if GLIB_CHECK_VERSION(2,21,3)
+		g_mapped_file_unref (mapped_file);
+#else
 		g_mapped_file_free (mapped_file);
+#endif
 	}
 
 	if (error != NULL) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]