aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavyd Madeley <davyd@madeley.id.au>2009-07-15 19:38:55 +0800
committerDavyd Madeley <davyd@madeley.id.au>2009-07-15 19:40:32 +0800
commit0343c43f77ab5e59c614af0c0fa60d518d78a774 (patch)
treebcc926cc0a336c8548a0580429eff276c7a9e742
parent8dd36644a68e297429a8a8a486df467a0d5d755c (diff)
downloadgsoc2013-empathy-0343c43f77ab5e59c614af0c0fa60d518d78a774.tar
gsoc2013-empathy-0343c43f77ab5e59c614af0c0fa60d518d78a774.tar.gz
gsoc2013-empathy-0343c43f77ab5e59c614af0c0fa60d518d78a774.tar.bz2
gsoc2013-empathy-0343c43f77ab5e59c614af0c0fa60d518d78a774.tar.lz
gsoc2013-empathy-0343c43f77ab5e59c614af0c0fa60d518d78a774.tar.xz
gsoc2013-empathy-0343c43f77ab5e59c614af0c0fa60d518d78a774.tar.zst
gsoc2013-empathy-0343c43f77ab5e59c614af0c0fa60d518d78a774.zip
Revert "Remove deprecated call to g_mapped_file_free()"
This commit breaks older GLib. When we're ready to bump our requirement to GLib 2.22, simply revert this commit. This reverts commit 0ade362fb9343ec984c396a202565c4e5faa1f12 but with an extra comment to explain what the hell is going on.
-rw-r--r--libempathy/empathy-log-store-empathy.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/libempathy/empathy-log-store-empathy.c b/libempathy/empathy-log-store-empathy.c
index 13146882d..b814defe7 100644
--- a/libempathy/empathy-log-store-empathy.c
+++ b/libempathy/empathy-log-store-empathy.c
@@ -27,7 +27,14 @@
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
+
+/* FIXME: g_mapped_file_free has been deprecated in GLib 2.22, but the
+ * replacement symbol, g_mapped_file_unref is not available in older Glib
+ * and we're not ready to bump our version requirement just for this. When
+ * we're ready to bump our version requirement, just revert this patch. */
+#undef G_DISABLE_DEPRECATED
#include <glib/gstdio.h>
+#define G_DISABLE_DEPRECATED
#include "empathy-log-store.h"
#include "empathy-log-store-empathy.h"
@@ -601,7 +608,7 @@ log_store_empathy_search_new (EmpathyLogStore *self,
contents = g_mapped_file_get_contents (file);
contents_casefold = g_utf8_casefold (contents, length);
- g_mapped_file_unref (file);
+ g_mapped_file_free (file);
if (strstr (contents_casefold, text_casefold))
{