Make it only accept those characters that we accept i
authorBehdad Esfahbod <behdad@gnome.org>
Mon, 31 Jul 2006 05:10:28 +0000 (05:10 +0000)
committerBehdad Esfahbod <behdad@src.gnome.org>
Mon, 31 Jul 2006 05:10:28 +0000 (05:10 +0000)
2006-07-31  Behdad Esfahbod  <behdad@gnome.org>

        * glib/guniprop.c (g_unichar_isxdigit): Make it only accept those
        characters that we accept i g_unichar_xdigit_value(), i.e. don't
        accept non-decimal digits. (#347842, Nikolai Weibull)

ChangeLog
ChangeLog.pre-2-12
glib/guniprop.c

index e99a6a3d6fdc5ffdd1761249b3d529a574933692..94c8e797b3c4c9201aa134e38657887f225bc98c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-07-31  Behdad Esfahbod  <behdad@gnome.org>
+
+       * glib/guniprop.c (g_unichar_isxdigit): Make it only accept those
+       characters that we accept i g_unichar_xdigit_value(), i.e. don't
+       accept non-decimal digits. (#347842, Nikolai Weibull)
+
 2006-07-31  Behdad Esfahbod  <behdad@gnome.org>
 
        * glib/gunidecomp.c (_g_utf8_normalize_wc): Update to reflect Unicode
index e99a6a3d6fdc5ffdd1761249b3d529a574933692..94c8e797b3c4c9201aa134e38657887f225bc98c 100644 (file)
@@ -1,3 +1,9 @@
+2006-07-31  Behdad Esfahbod  <behdad@gnome.org>
+
+       * glib/guniprop.c (g_unichar_isxdigit): Make it only accept those
+       characters that we accept i g_unichar_xdigit_value(), i.e. don't
+       accept non-decimal digits. (#347842, Nikolai Weibull)
+
 2006-07-31  Behdad Esfahbod  <behdad@gnome.org>
 
        * glib/gunidecomp.c (_g_utf8_normalize_wc): Update to reflect Unicode
index b3e295605e2c632906221a6cc87ac733a1e89c7f..d80ec03aaa289bf1eeb4d6b968ef6c29492fba5a 100644 (file)
 
 
 
-#define ISDIGIT(Type)  IS ((Type),                             \
-                           OR (G_UNICODE_DECIMAL_NUMBER,       \
-                           OR (G_UNICODE_LETTER_NUMBER,        \
-                           OR (G_UNICODE_OTHER_NUMBER,         0))))
-
 #define ISALPHA(Type)  IS ((Type),                             \
                            OR (G_UNICODE_LOWERCASE_LETTER,     \
                            OR (G_UNICODE_UPPERCASE_LETTER,     \
@@ -337,7 +332,7 @@ g_unichar_isxdigit (gunichar c)
 {
   return ((c >= 'a' && c <= 'f')
          || (c >= 'A' && c <= 'F')
-         || ISDIGIT (TYPE (c)));
+         || (TYPE (c) == G_UNICODE_DECIMAL_NUMBER));
 }
 
 /**