diff --git a/ChangeLog b/ChangeLog index 3a0cda274..4371d87ae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,28 @@ +2009-07-31 suzuki toshiya + + cache: Fix some data types mismatching with their sources. + + * src/cache/ftccache.h: The type of return value + by FTC_Node_WeightFunc function is changed to + FT_Offset. The type of FTC_CacheClass->cache_size + is changed to FT_Offset, too. + + * src/cache/ftccback.h (ft_inode_weight, + ftc_snode_weight): Ditto. + + * src/cache/ftccmap.c (ftc_cmap_node_weight): Ditto. + + * src/cache/ftcimage.c (ftc_inode_weight, + FTC_INode_Weight): Ditto. + + * src/cache/ftcsbits.c (ftc_snode_weight, + FTC_SNode_Weight): Ditto. + + * src/cache/ftcmru.h: The type of + FTC_MruListClass->node_size is changed to FT_Offset, + because it is passed to FT_ALLOC() to specify the + size of buffer. + 2009-07-31 suzuki toshiya XXX_cmap_encoding_char_next() return FT_UInt32 values. diff --git a/src/cache/ftccache.h b/src/cache/ftccache.h index 19ac5f7ce..2082bc4f4 100644 --- a/src/cache/ftccache.h +++ b/src/cache/ftccache.h @@ -91,7 +91,7 @@ FT_BEGIN_HEADER FT_Pointer query, FTC_Cache cache ); - typedef FT_ULong + typedef FT_Offset (*FTC_Node_WeightFunc)( FTC_Node node, FTC_Cache cache ); @@ -121,7 +121,7 @@ FT_BEGIN_HEADER FTC_Node_CompareFunc node_remove_faceid; FTC_Node_FreeFunc node_free; - FT_UInt cache_size; + FT_Offset cache_size; FTC_Cache_InitFunc cache_init; FTC_Cache_DoneFunc cache_done; diff --git a/src/cache/ftccback.h b/src/cache/ftccback.h index 86e72a751..4d0818db2 100644 --- a/src/cache/ftccback.h +++ b/src/cache/ftccback.h @@ -36,7 +36,7 @@ FT_Pointer gquery, FTC_Cache cache ); - FT_LOCAL( FT_ULong ) + FT_LOCAL( FT_Offset ) ftc_inode_weight( FTC_Node inode, FTC_Cache cache ); @@ -50,7 +50,7 @@ FT_Pointer gquery, FTC_Cache cache ); - FT_LOCAL( FT_ULong ) + FT_LOCAL( FT_Offset ) ftc_snode_weight( FTC_Node snode, FTC_Cache cache ); diff --git a/src/cache/ftccmap.c b/src/cache/ftccmap.c index e1b22b119..50a6189c5 100644 --- a/src/cache/ftccmap.c +++ b/src/cache/ftccmap.c @@ -174,7 +174,7 @@ /* compute the weight of a given cmap node */ - FT_CALLBACK_DEF( FT_ULong ) + FT_CALLBACK_DEF( FT_Offset ) ftc_cmap_node_weight( FTC_Node cnode, FTC_Cache cache ) { diff --git a/src/cache/ftcimage.c b/src/cache/ftcimage.c index 15d4e80c8..417daf2aa 100644 --- a/src/cache/ftcimage.c +++ b/src/cache/ftcimage.c @@ -103,12 +103,12 @@ } - FT_LOCAL_DEF( FT_ULong ) + FT_LOCAL_DEF( FT_Offset ) ftc_inode_weight( FTC_Node ftcinode, FTC_Cache ftccache ) { FTC_INode inode = (FTC_INode)ftcinode; - FT_ULong size = 0; + FT_Offset size = 0; FT_Glyph glyph = inode->glyph; FT_UNUSED( ftccache ); @@ -151,7 +151,7 @@ #if 0 - FT_LOCAL_DEF( FT_ULong ) + FT_LOCAL_DEF( FT_Offset ) FTC_INode_Weight( FTC_INode inode ) { return ftc_inode_weight( FTC_NODE( inode ), NULL ); diff --git a/src/cache/ftcmru.h b/src/cache/ftcmru.h index c8f0c6ef6..0cda76e6b 100644 --- a/src/cache/ftcmru.h +++ b/src/cache/ftcmru.h @@ -107,7 +107,7 @@ FT_BEGIN_HEADER typedef struct FTC_MruListClassRec_ { - FT_UInt node_size; + FT_Offset node_size; FTC_MruNode_CompareFunc node_compare; FTC_MruNode_InitFunc node_init; FTC_MruNode_ResetFunc node_reset; diff --git a/src/cache/ftcsbits.c b/src/cache/ftcsbits.c index 3bd5dd604..7330cba59 100644 --- a/src/cache/ftcsbits.c +++ b/src/cache/ftcsbits.c @@ -263,7 +263,7 @@ } - FT_LOCAL_DEF( FT_ULong ) + FT_LOCAL_DEF( FT_Offset ) ftc_snode_weight( FTC_Node ftcsnode, FTC_Cache cache ) { @@ -271,7 +271,7 @@ FT_UInt count = snode->count; FTC_SBit sbit = snode->sbits; FT_Int pitch; - FT_ULong size; + FT_Offset size; FT_UNUSED( cache ); @@ -300,7 +300,7 @@ #if 0 - FT_LOCAL_DEF( FT_ULong ) + FT_LOCAL_DEF( FT_Offset ) FTC_SNode_Weight( FTC_SNode snode ) { return ftc_snode_weight( FTC_NODE( snode ), NULL );