* include/freetype/ftcache.h (FT_POINTER_TO_ULONG): New macro. (FTC_FACE_ID_HASH): Rewritten, using FT_POINTER_TO_ULONG.
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 43
diff --git a/ChangeLog b/ChangeLog
index 9804fc9..0e6357e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-10-25 David Turner <david@freetype.org>
+
+ * include/freetype/ftcache.h (FT_POINTER_TO_ULONG): New macro.
+ (FTC_FACE_ID_HASH): Rewritten, using FT_POINTER_TO_ULONG.
+
2002-10-22 Giuseppe Ghibò <ghibo@mandrakesoft.com>
* include/freetype/freetype.h (FT_Encoding): Fix entry for latin-2.
diff --git a/include/freetype/freetype.h b/include/freetype/freetype.h
index eaeac75..82a5de4 100644
--- a/include/freetype/freetype.h
+++ b/include/freetype/freetype.h
@@ -548,7 +548,7 @@ FT_BEGIN_HEADER
/* <Values> */
/* ft_encoding_none :: see @FT_ENCODING_NONE */
/* ft_encoding_unicode :: see @FT_ENCODING_UNICODE */
- /* ft_encoding_latin_2 :: see @FT_ENCODING_LATIN_2 */
+ /* ft_encoding_latin_2 :: see @FT_ENCODING_OLD_LATIN_2 */
/* ft_encoding_symbol :: see @FT_ENCODING_MS_SYMBOL */
/* ft_encoding_sjis :: see @FT_ENCODING_MS_SJIS */
/* ft_encoding_gb2312 :: see @FT_ENCODING_MS_GB2312 */
diff --git a/include/freetype/ftcache.h b/include/freetype/ftcache.h
index 9796275..82af391 100644
--- a/include/freetype/ftcache.h
+++ b/include/freetype/ftcache.h
@@ -183,7 +183,11 @@ FT_BEGIN_HEADER
(f1)->pix_width == (f2)->pix_width && \
(f1)->pix_height == (f2)->pix_height )
-#define FTC_FACE_ID_HASH( i ) ((FT_UInt32)(FT_Pointer)( i ))
+#define FT_POINTER_TO_ULONG( p ) ((FT_ULong)(FT_Pointer)(p))
+
+#define FTC_FACE_ID_HASH( i ) \
+ ((FT_UInt32)(( FT_POINTER_TO_ULONG( i ) >> 3 ) ^ \
+ ( FT_POINTER_TO_ULONG( i ) << 7 ) ) )
#define FTC_FONT_HASH( f ) \
(FT_UInt32)( FTC_FACE_ID_HASH((f)->face_id) ^ \