cache: Fix some data types mismatching with their sources.
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 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164
diff --git a/ChangeLog b/ChangeLog
index 3a0cda2..4371d87 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,30 @@
2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ 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 <mpsuzuki@hiroshima-u.ac.jp>
+
XXX_cmap_encoding_char_next() return FT_UInt32 values.
* include/freetype/internal/services/svpscmap.h:
diff --git a/src/cache/ftccache.h b/src/cache/ftccache.h
index 19ac5f7..2082bc4 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 86e72a7..4d0818d 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 e1b22b1..50a6189 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 15d4e80..417daf2 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 c8f0c6e..0cda76e 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 3bd5dd6..7330cba 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 );