[tracker-miners/wip/carlosg/compiler-warnings: 21/23] libtracker-miner: Avoid deprecated g_pattern_match*() API
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners/wip/carlosg/compiler-warnings: 21/23] libtracker-miner: Avoid deprecated g_pattern_match*() API
- Date: Sun, 4 Sep 2022 21:39:19 +0000 (UTC)
commit 7d61981ba204d82e973c36ccea6c1699f5977c53
Author: Carlos Garnacho <carlosg gnome org>
Date: Sun Aug 28 23:10:33 2022 +0200
libtracker-miner: Avoid deprecated g_pattern_match*() API
If glib is greater than 2.70.0, use the newer API that replaces it.
src/libtracker-miner/tracker-indexing-tree.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/src/libtracker-miner/tracker-indexing-tree.c b/src/libtracker-miner/tracker-indexing-tree.c
index e653f30ac..fa030b370 100644
--- a/src/libtracker-miner/tracker-indexing-tree.c
+++ b/src/libtracker-miner/tracker-indexing-tree.c
@@ -778,7 +778,13 @@ tracker_indexing_tree_file_matches_filter (TrackerIndexingTree *tree,
break;
}
- if (g_pattern_match (data->pattern, len, str, reverse)) {
+#if GLIB_CHECK_VERSION (2, 70, 0)
+ if (g_pattern_spec_match (data->pattern, len, str, reverse))
+#else
+ if (g_pattern_match (data->pattern, len, str, reverse))
+#endif
+
+ {
match = TRUE;
break;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]