From 6d69c1f1ebaaf60b1d9a4c58ba17095ca53ccf9c Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 7 Nov 2013 23:33:30 +0100 Subject: [PATCH] match,charset: add obsolete GLib version checks --- src/charset.c | 2 -- src/match.c | 4 ---- 2 files changed, 6 deletions(-) diff --git a/src/charset.c b/src/charset.c index 157e022..909e776 100644 --- a/src/charset.c +++ b/src/charset.c @@ -39,10 +39,8 @@ charset_init(void) static inline unsigned unicode_char_width(gunichar ch) { -#if GLIB_CHECK_VERSION(2,14,0) if (g_unichar_iszerowidth(ch)) return 0; -#endif if (g_unichar_iswide(ch)) return 2; diff --git a/src/match.c b/src/match.c index b5d4c30..81a70f7 100644 --- a/src/match.c +++ b/src/match.c @@ -74,14 +74,10 @@ match_line(const char *line, const char *needle) char *line_folded = locale_casefold(line); char *needle_folded = locale_casefold(needle); -#if GLIB_CHECK_VERSION(2,14,0) bool ret = (bool)g_regex_match_simple((const gchar*)needle_folded, (const gchar*)line_folded, G_REGEX_CASELESS | G_REGEX_DOTALL | G_REGEX_OPTIMIZE, 0); -#else - bool ret = strstr(line_folded, needle_folded) != NULL; -#endif g_free(line_folded); g_free(needle_folded); -- 2.30.2