Cygwin support contributed by Stefan Ondrejicka <ondrej@idata.sk>.
[platform/upstream/glib.git] / gunidecomp.c
index 19d39e8..194c283 100644 (file)
 /* We cheat a bit and cast type values to (char *).  We detect these
    using the &0xff trick.  */
 #define CC(Page, Char) \
-  (((((int) (combining_class_table[Page])) & 0xff) \
-    == ((int) combining_class_table[Page])) \
-   ? ((int) combining_class_table[Page]) \
+  ((((GPOINTER_TO_INT(combining_class_table[Page])) & 0xff) \
+    == GPOINTER_TO_INT(combining_class_table[Page])) \
+   ? GPOINTER_TO_INT(combining_class_table[Page]) \
    : (combining_class_table[Page][Char]))
 
 #define COMBINING_CLASS(Char) \
-     (((Char) > (UNICODE_LAST_CHAR)) ? 0 : CC((Char) >> 8, (Char) & 0xff))
+     (((Char) > (G_UNICODE_LAST_CHAR)) ? 0 : CC((Char) >> 8, (Char) & 0xff))
 
 /* Compute the canonical ordering of a string in-place.  */
 void