ref: 61590b73d176ee5bb5adf02fe87886ee8286ffdc
parent: b8b498f2e27e480407bc1811473c23d68e94367f
author: suzuki toshiya <[email protected]>
date: Sun Oct 24 21:12:09 EDT 2010
[cache] Hide internal macros incompatible with LLP64. FT_POINTER_TO_ULONG(), FTC_FACE_ID_HASH() and FTC_IMAGE_TYPE_HASH() are enclosed by FT_CONFIG_OPTION_OLD_INTERNALS and hidden from normal clients. For the history of these macros, see the investigation: http://lists.gnu.org/archive/html/freetype/2010-10/msg00022.html
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
2010-10-24 suzuki toshiya <[email protected]>
+ [cache] Hide internal macros incompatible with LLP64.
+
+ FT_POINTER_TO_ULONG(), FTC_FACE_ID_HASH() and
+ FTC_IMAGE_TYPE_HASH() are enclosed by
+ FT_CONFIG_OPTION_OLD_INTERNALS and hidden from
+ normal clients.
+
+ For the history of these macros, see the investigation:
+ http://lists.gnu.org/archive/html/freetype/2010-10/msg00022.html
+
+2010-10-24 suzuki toshiya <[email protected]>
+
Change the type of FT_MEM_VAL() from FT_ULong to FT_PtrDist.
On LLP64 platforms (e.g. Win64), unsigned long (32-bit)
--- a/include/freetype/ftcache.h
+++ b/include/freetype/ftcache.h
@@ -214,6 +214,10 @@
/* */
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+
+ /* these macros are incompatible with LLP64, should not be used */
+
#define FT_POINTER_TO_ULONG( p ) ( (FT_ULong)(FT_Pointer)(p) )
#define FTC_FACE_ID_HASH( i ) \
@@ -220,6 +224,7 @@
((FT_UInt32)(( FT_POINTER_TO_ULONG( i ) >> 3 ) ^ \
( FT_POINTER_TO_ULONG( i ) << 7 ) ) )
+#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
/*************************************************************************/
/*************************************************************************/
@@ -700,12 +705,18 @@
(d1)->width == (d2)->width && \
(d1)->flags == (d2)->flags )
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+
+ /* this macro is incompatible with LLP64, should not be used */
+
#define FTC_IMAGE_TYPE_HASH( d ) \
(FT_UFast)( FTC_FACE_ID_HASH( (d)->face_id ) ^ \
( (d)->width << 8 ) ^ (d)->height ^ \
( (d)->flags << 4 ) )
+#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
+
/*************************************************************************/
/* */
/* <Type> */
@@ -1096,6 +1107,7 @@
(f1)->pix_width == (f2)->pix_width && \
(f1)->pix_height == (f2)->pix_height )
+ /* this macro is incompatible with LLP64, should not be used */
#define FTC_FONT_HASH( f ) \
(FT_UInt32)( FTC_FACE_ID_HASH((f)->face_id) ^ \
((f)->pix_width << 8) ^ \