[evolution-data-server] Work around deprecation of g_mapped_file_free().
- From: Matthew Barnes <mbarnes src gnome org>
- To: svn-commits-list gnome org
- Subject: [evolution-data-server] Work around deprecation of g_mapped_file_free().
- Date: Fri, 19 Jun 2009 10:45:46 -0400 (EDT)
commit 440cf63332708e09cc8a5fbcdcec32fa52d59ad2
Author: Matthew Barnes <mbarnes redhat com>
Date: Fri Jun 19 10:44:12 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.
calendar/backends/file/e-cal-backend-file.c | 4 ++++
calendar/backends/google/e-cal-backend-google.c | 4 ++++
.../backends/groupwise/e-cal-backend-groupwise.c | 4 ++++
libedataserver/e-xml-utils.c | 4 ++++
libedataserver/md5-utils.c | 4 ++++
5 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/calendar/backends/file/e-cal-backend-file.c b/calendar/backends/file/e-cal-backend-file.c
index 29284f7..d66cf4e 100644
--- a/calendar/backends/file/e-cal-backend-file.c
+++ b/calendar/backends/file/e-cal-backend-file.c
@@ -2510,7 +2510,11 @@ fetch_attachments (ECalBackendSync *backend, ECalComponent *comp)
g_message ("DEBUG: attachment write failed.\n");
}
+#if GLIB_CHECK_VERSION(2,21,3)
+ g_mapped_file_unref (mapped_file);
+#else
g_mapped_file_free (mapped_file);
+#endif
if (fd != -1)
close (fd);
dest_url = g_filename_to_uri (dest_file, NULL, NULL);
diff --git a/calendar/backends/google/e-cal-backend-google.c b/calendar/backends/google/e-cal-backend-google.c
index 845d6d3..b7ce27f 100644
--- a/calendar/backends/google/e-cal-backend-google.c
+++ b/calendar/backends/google/e-cal-backend-google.c
@@ -523,7 +523,11 @@ fetch_attachments (ECalBackendGoogle *cbgo, ECalComponent *comp)
g_message ("DEBUG: attachment write failed.\n");
}
+#if GLIB_CHECK_VERSION(2,21,3)
+ g_mapped_file_unref (mapped_file);
+#else
g_mapped_file_free (mapped_file);
+#endif
if (fd != -1)
close (fd);
dest_url = g_filename_to_uri (dest_file, NULL, NULL);
diff --git a/calendar/backends/groupwise/e-cal-backend-groupwise.c b/calendar/backends/groupwise/e-cal-backend-groupwise.c
index aec0661..a447aed 100644
--- a/calendar/backends/groupwise/e-cal-backend-groupwise.c
+++ b/calendar/backends/groupwise/e-cal-backend-groupwise.c
@@ -2449,7 +2449,11 @@ fetch_attachments (ECalBackendGroupwise *cbgw, ECalComponent *comp)
g_message ("DEBUG: attachment write failed.\n");
}
+#if GLIB_CHECK_VERSION(2,21,3)
+ g_mapped_file_unref (mapped_file);
+#else
g_mapped_file_free (mapped_file);
+#endif
if (fd != -1)
close (fd);
dest_url = g_filename_to_uri (dest_file, NULL, NULL);
diff --git a/libedataserver/e-xml-utils.c b/libedataserver/e-xml-utils.c
index 8901ce3..3c8abe1 100644
--- a/libedataserver/e-xml-utils.c
+++ b/libedataserver/e-xml-utils.c
@@ -50,7 +50,11 @@ e_xml_parse_file (const gchar *filename)
if (mapped_file) {
result = xmlParseMemory (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
}
return result;
}
diff --git a/libedataserver/md5-utils.c b/libedataserver/md5-utils.c
index 4ef3780..ceb6480 100644
--- a/libedataserver/md5-utils.c
+++ b/libedataserver/md5-utils.c
@@ -362,5 +362,9 @@ md5_get_digest_from_file (const gchar *filename, guchar digest[16])
md5_get_digest (contents, length, digest);
+#if GLIB_CHECK_VERSION(2,21,3)
+ g_mapped_file_unref (mapped_file);
+#else
g_mapped_file_free (mapped_file);
+#endif
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]