cache: Disable the legacy compatibility if 16-bit system.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
diff --git a/ChangeLog b/ChangeLog
index 3b5ecbe..374304b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ cache: Disable the legacy compatibility if 16-bit system.
+
+ * src/cache/ftcbasic.c (FTC_ImageCache_Lookup): Exclude
+ the legacy behaviour from 16-bit platform, because the
+ current hack cannot detect the caller uses this function
+ via legacy convension.
+ (FTC_SBitCache_Lookup): Ditto.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
cache: Check 32-bit glyph index on 16-bit systems.
* src/cache/ftcbasic.c (ftc_basic_family_get_count):
diff --git a/src/cache/ftcbasic.c b/src/cache/ftcbasic.c
index 6519c5e..9f822e4 100644
--- a/src/cache/ftcbasic.c
+++ b/src/cache/ftcbasic.c
@@ -328,7 +328,7 @@
if ( anode )
*anode = NULL;
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+#if defined( FT_CONFIG_OPTION_OLD_INTERNALS ) && ( FT_INT_MAX > 0xFFFFU )
/*
* This one is a major hack used to detect whether we are passed a
@@ -651,7 +651,7 @@
*ansbit = NULL;
-#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+#if defined( FT_CONFIG_OPTION_OLD_INTERNALS ) && ( FT_INT_MAX > 0xFFFFU )
/* This one is a major hack used to detect whether we are passed a
* regular FTC_ImageType handle, or a legacy FTC_OldImageDesc one.