[evolution-mapi] Work around deprecation of g_mapped_file_free().
- From: Matthew Barnes <mbarnes src gnome org>
- To: svn-commits-list gnome org
- Subject: [evolution-mapi] Work around deprecation of g_mapped_file_free().
- Date: Fri, 19 Jun 2009 10:57:25 -0400 (EDT)
commit 94809815f679e9df93822aa2b810b730d654a29e
Author: Matthew Barnes <mbarnes redhat com>
Date: Fri Jun 19 10:56:49 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.
src/libexchangemapi/exchange-mapi-cal-tz-utils.c | 18 ++++++++++++++++++
src/libexchangemapi/exchange-mapi-cal-utils.c | 4 ++++
2 files changed, 22 insertions(+), 0 deletions(-)
---
diff --git a/src/libexchangemapi/exchange-mapi-cal-tz-utils.c b/src/libexchangemapi/exchange-mapi-cal-tz-utils.c
index 13e6a78..6d39730 100644
--- a/src/libexchangemapi/exchange-mapi-cal-tz-utils.c
+++ b/src/libexchangemapi/exchange-mapi-cal-tz-utils.c
@@ -143,9 +143,17 @@ exchange_mapi_cal_tz_util_populate ()
g_warning ("Could not map Exchange MAPI timezone files.");
if (mtoi_mf)
+#if GLIB_CHECK_VERSION(2,21,3)
+ g_mapped_file_unref (mtoi_mf);
+#else
g_mapped_file_free (mtoi_mf);
+#endif
if (itom_mf)
+#if GLIB_CHECK_VERSION(2,21,3)
+ g_mapped_file_unref (itom_mf);
+#else
g_mapped_file_free (itom_mf);
+#endif
g_static_rec_mutex_unlock(&mutex);
return FALSE;
@@ -170,15 +178,25 @@ exchange_mapi_cal_tz_util_populate ()
exchange_mapi_cal_tz_util_destroy ();
+#if GLIB_CHECK_VERSION(2,21,3)
+ g_mapped_file_unref (mtoi_mf);
+ g_mapped_file_unref (itom_mf);
+#else
g_mapped_file_free (mtoi_mf);
g_mapped_file_free (itom_mf);
+#endif
g_static_rec_mutex_unlock(&mutex);
return FALSE;
}
+#if GLIB_CHECK_VERSION(2,21,3)
+ g_mapped_file_unref (mtoi_mf);
+ g_mapped_file_unref (itom_mf);
+#else
g_mapped_file_free (mtoi_mf);
g_mapped_file_free (itom_mf);
+#endif
d(exchange_mapi_cal_tz_util_dump ());
diff --git a/src/libexchangemapi/exchange-mapi-cal-utils.c b/src/libexchangemapi/exchange-mapi-cal-utils.c
index 4af8657..75e952d 100644
--- a/src/libexchangemapi/exchange-mapi-cal-utils.c
+++ b/src/libexchangemapi/exchange-mapi-cal-utils.c
@@ -253,7 +253,11 @@ exchange_mapi_cal_util_fetch_attachments (ECalComponent *comp, GSList **attach_l
*attach_list = g_slist_append (*attach_list, attach_item);
+#if GLIB_CHECK_VERSION(2,21,3)
+ g_mapped_file_unref (mapped_file);
+#else
g_mapped_file_free (mapped_file);
+#endif
} else {
g_debug ("Could not map %s: %s \n", sfname_uri, error->message);
g_error_free (error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]