[tracker] Fixes GB#572237, Remove deprecated Glib symbols
- From: Martyn James Russell <mr src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [tracker] Fixes GB#572237, Remove deprecated Glib symbols
- Date: Mon, 4 Jan 2010 11:19:59 +0000 (UTC)
commit 8dc90837a2ea4d59778c676da6a23a93534c9bce
Author: Javier Jardón <jjardon gnome org>
Date: Mon Jan 4 11:19:39 2010 +0000
Fixes GB#572237, Remove deprecated Glib symbols
src/libtracker-common/tracker-language.c | 4 ++++
src/libtracker-db/tracker-db-journal.c | 4 ++++
tests/common/tracker-test-helpers.c | 4 ++++
3 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-common/tracker-language.c b/src/libtracker-common/tracker-language.c
index dfd9b1b..324317e 100644
--- a/src/libtracker-common/tracker-language.c
+++ b/src/libtracker-common/tracker-language.c
@@ -253,7 +253,11 @@ language_add_stopwords (TrackerLanguage *language,
content = g_mapped_file_get_contents (mapped_file);
words = g_strsplit_set (content, "\n" , -1);
+#if GLIB_CHECK_VERSION(2,22,0)
+ g_mapped_file_unref (mapped_file);
+#else
g_mapped_file_free (mapped_file);
+#endif
/* FIXME: Shouldn't clear the hash table first? */
for (p = words; *p; p++) {
diff --git a/src/libtracker-db/tracker-db-journal.c b/src/libtracker-db/tracker-db-journal.c
index 4e94c89..bec8d8c 100644
--- a/src/libtracker-db/tracker-db-journal.c
+++ b/src/libtracker-db/tracker-db-journal.c
@@ -157,7 +157,11 @@ void
tracker_db_journal_free_contents (TrackerJournalContents *contents)
{
if (mapped) {
+#if GLIB_CHECK_VERSION(2,22,0)
+ g_mapped_file_unref (mapped);
+#else
g_mapped_file_free (mapped);
+#endif
mapped = NULL;
}
diff --git a/tests/common/tracker-test-helpers.c b/tests/common/tracker-test-helpers.c
index b1dddb0..2a362a7 100644
--- a/tests/common/tracker-test-helpers.c
+++ b/tests/common/tracker-test-helpers.c
@@ -51,7 +51,11 @@ tracker_test_helpers_get_nonutf8 (void)
file = g_mapped_file_new (TEST_TEXT, FALSE, NULL);
nonutf8_str = g_strdup (g_mapped_file_get_contents (file));
nonutf8_str [g_mapped_file_get_length (file) -1] = '\0';
+#if GLIB_CHECK_VERSION(2,22,0)
+ g_mapped_file_unref (file);
+#else
g_mapped_file_free (file);
+#endif
}
return nonutf8_str;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]