Skip to content

Commit

Permalink
geanyctags: Use g_pattern_spec_match_string() instead of g_pattern_ma…
Browse files Browse the repository at this point in the history
…tch_string()

With a fallback on older glib versions.
  • Loading branch information
techee committed Apr 23, 2024
1 parent 8c56a7c commit 046b01c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion geanyctags/src/geanyctags.c
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,10 @@ static gboolean find_next(tagFile *tf, tagEntry *entry, MatchType match_type)
return ret;
}

#if ! GLIB_CHECK_VERSION(2, 70, 0)
# define g_pattern_spec_match_string g_pattern_match_string
#endif

static gboolean filter_tag(tagEntry *entry, GPatternSpec *name, gboolean declaration, gboolean case_sensitive)
{
gboolean filter = TRUE;
Expand All @@ -415,7 +419,7 @@ static gboolean filter_tag(tagEntry *entry, GPatternSpec *name, gboolean declara
else
entry_name = g_utf8_strdown(entry->name, -1);

filter = !g_pattern_match_string(name, entry_name);
filter = !g_pattern_spec_match_string(name, entry_name);

g_free(entry_name);

Expand Down

0 comments on commit 046b01c

Please sign in to comment.