* include/freetype/ftcache.h (FT_POINTER_TO_ULONG): New macro.

(FTC_FACE_ID_HASH): Rewritten, using FT_POINTER_TO_ULONG.
This commit is contained in:
Werner Lemberg 2002-10-25 12:22:31 +00:00
parent 5d506cf3c7
commit 6b37302d08
3 changed files with 11 additions and 2 deletions

View File

@ -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.

View File

@ -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 */

View File

@ -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) ^ \