Avoid using a C++ keyword in header file
authorPeter Eisentraut <peter_e@gmx.net>
Fri, 7 Apr 2017 20:32:02 +0000 (16:32 -0400)
committerPeter Eisentraut <peter_e@gmx.net>
Fri, 7 Apr 2017 20:32:02 +0000 (16:32 -0400)
per cpluspluscheck

src/common/unicode/generate-unicode_norm_table.pl
src/common/unicode_norm.c
src/include/common/unicode_norm_table.h

index 6d6e803b085bd8f869eb84d64a64891d4db258d4..41792afd3edd945d67de2bc9306e9d9d36804c30 100644 (file)
@@ -88,7 +88,7 @@ print $OUTPUT <<HEADER;
 typedef struct
 {
    uint32      codepoint;      /* Unicode codepoint */
-   uint8       class;          /* combining class of character */
+   uint8       comb_class;     /* combining class of character */
    uint8       dec_size_flags; /* size and flags of decomposition code list */
    uint16      dec_index;      /* index into UnicodeDecomp_codepoints, or the
                                 * decomposition itself if DECOMP_INLINE */
index 9eddadeda2e8908490a6a987926fd7d41ce626a0..740b10d22a15b9cb2000c6f967ca2447d9d0b051 100644 (file)
@@ -369,10 +369,10 @@ unicode_normalize_kc(const pg_wchar *input)
         * combining class for the second, and the second is not a starter.  A
         * character is a starter if its combining class is 0.
         */
-       if (nextEntry->class == 0x0 || prevEntry->class == 0x0)
+       if (nextEntry->comb_class == 0x0 || prevEntry->comb_class == 0x0)
            continue;
 
-       if (prevEntry->class <= nextEntry->class)
+       if (prevEntry->comb_class <= nextEntry->comb_class)
            continue;
 
        /* exchange can happen */
@@ -407,7 +407,7 @@ unicode_normalize_kc(const pg_wchar *input)
    {
        pg_wchar    ch = decomp_chars[count];
        pg_unicode_decomposition *ch_entry = get_code_entry(ch);
-       int         ch_class = (ch_entry == NULL) ? 0 : ch_entry->class;
+       int         ch_class = (ch_entry == NULL) ? 0 : ch_entry->comb_class;
        pg_wchar    composite;
 
        if (last_class < ch_class &&
index a0181f1b9640f338806447959318671c71688375..3bcf05e5eec6d341e7ff5604eeeca23f6afb0f9c 100644 (file)
@@ -19,7 +19,7 @@
 typedef struct
 {
    uint32      codepoint;      /* Unicode codepoint */
-   uint8       class;          /* combining class of character */
+   uint8       comb_class;     /* combining class of character */
    uint8       dec_size_flags; /* size and flags of decomposition code list */
    uint16      dec_index;      /* index into UnicodeDecomp_codepoints, or the
                                 * decomposition itself if DECOMP_INLINE */