From 6a6da9637a8cb16cfec4820e32a18382ebc71909 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 27 Jul 2021 08:01:49 -0400 Subject: [PATCH] Fix a Unicode typo The name of one of the Unicode Break types is misspelt. Add an alias, since it annoys me every time I look at Pango's break code. --- glib/gen-unicode-tables.pl | 2 +- glib/gunibreak.h | 4 ++-- glib/gunicode.h | 4 +++- glib/tests/unicode.c | 2 +- gobject/glib-enumtypes.c.template | 9 +++++++++ 5 files changed, 16 insertions(+), 5 deletions(-) diff --git a/glib/gen-unicode-tables.pl b/glib/gen-unicode-tables.pl index 6601126c4..e742258ce 100755 --- a/glib/gen-unicode-tables.pl +++ b/glib/gen-unicode-tables.pl @@ -119,7 +119,7 @@ $FOLDING_MAPPING = 2; 'CJ' => "G_UNICODE_BREAK_CONDITIONAL_JAPANESE_STARTER", 'CL' => "G_UNICODE_BREAK_CLOSE_PUNCTUATION", 'CM' => "G_UNICODE_BREAK_COMBINING_MARK", - 'CP' => "G_UNICODE_BREAK_CLOSE_PARANTHESIS", + 'CP' => "G_UNICODE_BREAK_CLOSE_PARENTHESIS", 'CR' => "G_UNICODE_BREAK_CARRIAGE_RETURN", 'EB' => "G_UNICODE_BREAK_EMOJI_BASE", 'EM' => "G_UNICODE_BREAK_EMOJI_MODIFIER", diff --git a/glib/gunibreak.h b/glib/gunibreak.h index d2d38a100..8548f5216 100644 --- a/glib/gunibreak.h +++ b/glib/gunibreak.h @@ -38,7 +38,7 @@ static const gint8 break_property_data[][256] = { G_UNICODE_BREAK_QUOTATION, G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_PREFIX, G_UNICODE_BREAK_POSTFIX, G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_QUOTATION, - G_UNICODE_BREAK_OPEN_PUNCTUATION, G_UNICODE_BREAK_CLOSE_PARANTHESIS, + G_UNICODE_BREAK_OPEN_PUNCTUATION, G_UNICODE_BREAK_CLOSE_PARENTHESIS, G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_PREFIX, G_UNICODE_BREAK_INFIX_SEPARATOR, G_UNICODE_BREAK_HYPHEN, G_UNICODE_BREAK_INFIX_SEPARATOR, G_UNICODE_BREAK_SYMBOL, @@ -64,7 +64,7 @@ static const gint8 break_property_data[][256] = { G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_OPEN_PUNCTUATION, - G_UNICODE_BREAK_PREFIX, G_UNICODE_BREAK_CLOSE_PARANTHESIS, + G_UNICODE_BREAK_PREFIX, G_UNICODE_BREAK_CLOSE_PARENTHESIS, G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, G_UNICODE_BREAK_ALPHABETIC, diff --git a/glib/gunicode.h b/glib/gunicode.h index d72980380..e6985d220 100644 --- a/glib/gunicode.h +++ b/glib/gunicode.h @@ -194,7 +194,8 @@ typedef enum * @G_UNICODE_BREAK_HANGUL_T_JAMO: Hangul T Jamo (JT) * @G_UNICODE_BREAK_HANGUL_LV_SYLLABLE: Hangul LV Syllable (H2) * @G_UNICODE_BREAK_HANGUL_LVT_SYLLABLE: Hangul LVT Syllable (H3) - * @G_UNICODE_BREAK_CLOSE_PARANTHESIS: Closing Parenthesis (CP). Since 2.28 + * @G_UNICODE_BREAK_CLOSE_PARANTHESIS: Closing Parenthesis (CP). Since 2.28. Deprecated: 2.70: Use %G_UNICODE_BREAK_CLOSE_PARENTHESIS instead. + * @G_UNICODE_BREAK_CLOSE_PARENTHESIS: Closing Parenthesis (CP). Since 2.70 * @G_UNICODE_BREAK_CONDITIONAL_JAPANESE_STARTER: Conditional Japanese Starter (CJ). Since: 2.32 * @G_UNICODE_BREAK_HEBREW_LETTER: Hebrew Letter (HL). Since: 2.32 * @G_UNICODE_BREAK_REGIONAL_INDICATOR: Regional Indicator (RI). Since: 2.36 @@ -248,6 +249,7 @@ typedef enum G_UNICODE_BREAK_HANGUL_LV_SYLLABLE, G_UNICODE_BREAK_HANGUL_LVT_SYLLABLE, G_UNICODE_BREAK_CLOSE_PARANTHESIS, + G_UNICODE_BREAK_CLOSE_PARENTHESIS GLIB_AVAILABLE_ENUMERATOR_IN_2_70 = G_UNICODE_BREAK_CLOSE_PARANTHESIS, G_UNICODE_BREAK_CONDITIONAL_JAPANESE_STARTER, G_UNICODE_BREAK_HEBREW_LETTER, G_UNICODE_BREAK_REGIONAL_INDICATOR, diff --git a/glib/tests/unicode.c b/glib/tests/unicode.c index bf1ad52ab..919cd44b7 100644 --- a/glib/tests/unicode.c +++ b/glib/tests/unicode.c @@ -131,7 +131,7 @@ test_unichar_break_type (void) { G_UNICODE_BREAK_HYPHEN, 0x002D }, { G_UNICODE_BREAK_NON_STARTER, 0x17D6 }, { G_UNICODE_BREAK_OPEN_PUNCTUATION, 0x0028 }, - { G_UNICODE_BREAK_CLOSE_PARANTHESIS, 0x0029 }, + { G_UNICODE_BREAK_CLOSE_PARENTHESIS, 0x0029 }, { G_UNICODE_BREAK_CLOSE_PUNCTUATION, 0x007D }, { G_UNICODE_BREAK_QUOTATION, 0x0022 }, { G_UNICODE_BREAK_EXCLAMATION, 0x0021 }, diff --git a/gobject/glib-enumtypes.c.template b/gobject/glib-enumtypes.c.template index 1800ca8af..42f9c341f 100644 --- a/gobject/glib-enumtypes.c.template +++ b/gobject/glib-enumtypes.c.template @@ -3,10 +3,19 @@ #include "glib-enumtypes.h" #include +G_GNUC_BEGIN_IGNORE_DEPRECATIONS + /*** END file-header ***/ +/*** BEGIN file-tail ***/ + +G_GNUC_END_IGNORE_DEPRECATIONS + +/*** END file-tail ***/ + /*** BEGIN file-production ***/ /* enumerations from "@filename@" */ + /*** END file-production ***/ /*** BEGIN value-header ***/