Code

match,charset: add obsolete GLib version checks
authorMax Kellermann <max@duempel.org>
Thu, 7 Nov 2013 22:33:30 +0000 (23:33 +0100)
committerMax Kellermann <max@duempel.org>
Thu, 7 Nov 2013 22:33:30 +0000 (23:33 +0100)
src/charset.c
src/match.c

index 157e022e48a0c3bd30c34544cdfcce786d547ec7..909e77656faca5a9b18bf769271f0afa8956da3a 100644 (file)
@@ -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;
index b5d4c30f2422618a0a6f3ee125d2420f8ff4c5f5..81a70f7f7d48fcd137434a82febec112880fa401 100644 (file)
@@ -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);