Ticket #4131: str_unichar_iscombiningmark.patch

File str_unichar_iscombiningmark.patch, 850 bytes (added by angel_il, 4 years ago)

fixup for G_UNICODE_COMBINING_MARK has been deprecated since version 2.30 and should not be used in newly-written code. Use G_UNICODE_SPACING_MARK.

  • lib/strutil/strutilutf8.c

    diff --git a/lib/strutil/strutilutf8.c b/lib/strutil/strutilutf8.c
    index efec6be54..3d655019f 100644
    a b  
    3838 
    3939/*** file scope macro definitions ****************************************************************/ 
    4040 
     41#if GLIB_CHECK_VERSION (2, 30, 0) 
     42#define SPACING_MARK G_UNICODE_SPACING_MARK 
     43#else 
     44#define SPACING_MARK G_UNICODE_COMBINING_MARK 
     45#endif 
     46 
    4147/*** file scope type declarations ****************************************************************/ 
    4248 
    4349struct utf8_tool 
    str_unichar_iscombiningmark (gunichar uni) 
    7076    GUnicodeType type; 
    7177 
    7278    type = g_unichar_type (uni); 
    73     return (type == G_UNICODE_COMBINING_MARK) 
     79    return (type == SPACING_MARK) 
    7480        || (type == G_UNICODE_ENCLOSING_MARK) || (type == G_UNICODE_NON_SPACING_MARK); 
    7581} 
    7682