shithub: freetype+ttf2subf

Download patch

ref: b566d42aa0470683634174671ce652f385902a93
parent: ebf8e294fc6527f82a307492c21eef4df778f449
author: suzuki toshiya <[email protected]>
date: Fri Jul 31 20:30:19 EDT 2009

cache: Fix some data types mismatching with their sources.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,18 @@
 
 	cache: Fix some data types mismatching with their sources.
 
+	* src/cache/ftccache.c (ftc_cache_resize): The types of
+	`p', `mask', `count' are matched with FTC_Cache->{p,mask}.
+	(FTC_Cache_Clear): The type of `old_index' is matched to
+	FTC_Cache->{p,mask}.
+
+	* src/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP): The type
+	of `_idx' is matched with FTC_Cache->{p,mask}.
+
+2009-07-31  suzuki toshiya <[email protected]>
+
+	cache: Fix some data types mismatching with their sources.
+
 	* src/cache/ftcsbits.c (ftc_snode_load): The types
 	of `xadvance' and `yadvance' are matched with
 	FT_GlyphSlot->advance.{x|y}.
--- a/src/cache/ftccache.c
+++ b/src/cache/ftccache.c
@@ -93,9 +93,9 @@
     for (;;)
     {
       FTC_Node  node, *pnode;
-      FT_UInt   p      = cache->p;
-      FT_UInt   mask   = cache->mask;
-      FT_UInt   count  = mask + p + 1;    /* number of buckets */
+      FT_UFast  p      = cache->p;
+      FT_UFast  mask   = cache->mask;
+      FT_UFast  count  = mask + p + 1;    /* number of buckets */
 
 
       /* do we need to shrink the buckets array? */
@@ -153,7 +153,7 @@
       /* do we need to expand the buckets array? */
       else if ( cache->slack > (FT_Long)count * FTC_HASH_SUB_LOAD )
       {
-        FT_UInt    old_index = p + mask;
+        FT_UFast   old_index = p + mask;
         FTC_Node*  pold;
 
 
@@ -347,7 +347,7 @@
     {
       FTC_Manager  manager = cache->manager;
       FT_UFast     i;
-      FT_UInt      count;
+      FT_UFast     count;
 
 
       count = cache->p + cache->mask + 1;
--- a/src/cache/ftccache.h
+++ b/src/cache/ftccache.h
@@ -202,7 +202,7 @@
     FTC_Cache             _cache   = FTC_CACHE(cache);                   \
     FT_UInt32             _hash    = (FT_UInt32)(hash);                  \
     FTC_Node_CompareFunc  _nodcomp = (FTC_Node_CompareFunc)(nodecmp);    \
-    FT_UInt               _idx;                                          \
+    FT_UFast              _idx;                                          \
                                                                          \
                                                                          \
     error = 0;                                                           \