[tracker-miners/wip/carlosg/compiler-warnings: 10/12] 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: 10/12] libtracker-miner: Avoid deprecated g_pattern_match*() API
- Date: Sun, 28 Aug 2022 21:28:01 +0000 (UTC)
commit 8c1730f192a8bb6994c2f0ab7fa51edafc5582b6
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]