Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 0cb2e51

Browse files
committed
Avoid using a C++ keyword in header file
per cpluspluscheck
1 parent 817cb10 commit 0cb2e51

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/common/unicode/generate-unicode_norm_table.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
typedef struct
8989
{
9090
uint32 codepoint; /* Unicode codepoint */
91-
uint8 class; /* combining class of character */
91+
uint8 comb_class; /* combining class of character */
9292
uint8 dec_size_flags; /* size and flags of decomposition code list */
9393
uint16 dec_index; /* index into UnicodeDecomp_codepoints, or the
9494
* decomposition itself if DECOMP_INLINE */

src/common/unicode_norm.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -369,10 +369,10 @@ unicode_normalize_kc(const pg_wchar *input)
369369
* combining class for the second, and the second is not a starter. A
370370
* character is a starter if its combining class is 0.
371371
*/
372-
if (nextEntry->class == 0x0 || prevEntry->class == 0x0)
372+
if (nextEntry->comb_class == 0x0 || prevEntry->comb_class == 0x0)
373373
continue;
374374

375-
if (prevEntry->class <= nextEntry->class)
375+
if (prevEntry->comb_class <= nextEntry->comb_class)
376376
continue;
377377

378378
/* exchange can happen */
@@ -407,7 +407,7 @@ unicode_normalize_kc(const pg_wchar *input)
407407
{
408408
pg_wchar ch = decomp_chars[count];
409409
pg_unicode_decomposition *ch_entry = get_code_entry(ch);
410-
int ch_class = (ch_entry == NULL) ? 0 : ch_entry->class;
410+
int ch_class = (ch_entry == NULL) ? 0 : ch_entry->comb_class;
411411
pg_wchar composite;
412412

413413
if (last_class < ch_class &&

src/include/common/unicode_norm_table.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
typedef struct
2020
{
2121
uint32 codepoint; /* Unicode codepoint */
22-
uint8 class; /* combining class of character */
22+
uint8 comb_class; /* combining class of character */
2323
uint8 dec_size_flags; /* size and flags of decomposition code list */
2424
uint16 dec_index; /* index into UnicodeDecomp_codepoints, or the
2525
* decomposition itself if DECOMP_INLINE */

0 commit comments

Comments
 (0)