[glib/wip/pcre-update: 17/17] regex: Fix unicode othercasing



commit bd4b93e6b038764774607b475ebae4d4b1426d2b
Author: Christian Persch <chpe gnome org>
Date:   Sun Jun 17 22:51:44 2012 +0200

    regex: Fix unicode othercasing
    
    Reorder the toupper/tolower calls when othercaseing, so this
    function is bug-for-bug compatible with the pcre internal tables.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=678273

 glib/pcre/pcre_tables.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/glib/pcre/pcre_tables.c b/glib/pcre/pcre_tables.c
index 5bac855..ddbf950 100644
--- a/glib/pcre/pcre_tables.c
+++ b/glib/pcre/pcre_tables.c
@@ -589,10 +589,10 @@ _pcre_ucp_othercase(const unsigned int c)
 {
   unsigned int oc;
 
-  if ((oc = g_unichar_tolower(c)) != c)
-    return oc;
   if ((oc = g_unichar_toupper(c)) != c)
     return oc;
+  if ((oc = g_unichar_tolower(c)) != c)
+    return oc;
 
   return c;
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]