Commit 52a1e47a5c39eb66e3ec6895bffd370650cf3c20

suzuki toshiya 2011-01-09T20:47:37

[cache] inline-specific functions are conditionalized. * src/cache/ftcglyph.c (FTC_GNode_Compare): Conditionalized for inlined config. This function is a thin wrapper of ftc_gnode_compare() for inlined FTC_CACHE_LOOKUP_CMP() (see `nodecmp' argument). Under non-inlined config, ftc_gnode_compare() is invoked by FTC_Cache_Lookup(), via FTC_Cache->clazz.node_compare(). * src/cache/ftcglyph.h (FTC_GNode_Compare): Ditto. * src/cache/ftcsbits.c (FTC_SNode_Compare): Ditto, for ftc_snode_compare(). * src/cache/ftcsbits.h (FTC_SNode_Compare): Ditto.

diff --git a/ChangeLog b/ChangeLog
index 2e1cae6..db1db6c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,21 @@
 2010-01-09  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
 
+	[cache] inline-specific functions are conditionalized.
+
+	* src/cache/ftcglyph.c (FTC_GNode_Compare): Conditionalized
+	for inlined config.  This function is a thin wrapper of
+	ftc_gnode_compare() for inlined FTC_CACHE_LOOKUP_CMP()
+	(see `nodecmp' argument).  Under non-inlined config,
+	ftc_gnode_compare() is invoked by FTC_Cache_Lookup(),
+	via FTC_Cache->clazz.node_compare().
+
+	* src/cache/ftcglyph.h (FTC_GNode_Compare): Ditto.
+	* src/cache/ftcsbits.c (FTC_SNode_Compare): Ditto,
+	for ftc_snode_compare().
+	* src/cache/ftcsbits.h (FTC_SNode_Compare): Ditto.
+
+2010-01-09  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
+
 	[cache] Correct a type mismatch under non-inlined config.
 
 	* src/cache/ftcglyph.h (FTC_GCACHE_LOOKUP_CMP):
diff --git a/src/cache/ftcglyph.c b/src/cache/ftcglyph.c
index a73e243..fb825d4 100644
--- a/src/cache/ftcglyph.c
+++ b/src/cache/ftcglyph.c
@@ -76,6 +76,8 @@
   }
 
 
+#ifdef FTC_INLINE
+
   FT_LOCAL_DEF( FT_Bool )
   FTC_GNode_Compare( FTC_GNode   gnode,
                      FTC_GQuery  gquery )
@@ -83,6 +85,7 @@
     return ftc_gnode_compare( FTC_NODE( gnode ), gquery, NULL );
   }
 
+#endif
 
   /*************************************************************************/
   /*************************************************************************/
diff --git a/src/cache/ftcglyph.h b/src/cache/ftcglyph.h
index 3eec640..06b2031 100644
--- a/src/cache/ftcglyph.h
+++ b/src/cache/ftcglyph.h
@@ -180,6 +180,8 @@ FT_BEGIN_HEADER
                   FT_UInt     gindex,  /* glyph index for node */
                   FTC_Family  family );
 
+#ifdef FTC_INLINE
+
   /* returns TRUE iff the query's glyph index correspond to the node;  */
   /* this assumes that the `family' and `hash' fields of the query are */
   /* already correctly set                                             */
@@ -187,6 +189,8 @@ FT_BEGIN_HEADER
   FTC_GNode_Compare( FTC_GNode   gnode,
                      FTC_GQuery  gquery );
 
+#endif
+
   /* call this function to clear a node's family -- this is necessary */
   /* to implement the `node_remove_faceid' cache method correctly     */
   FT_LOCAL( void )
diff --git a/src/cache/ftcsbits.c b/src/cache/ftcsbits.c
index 0386bdd..52972a6 100644
--- a/src/cache/ftcsbits.c
+++ b/src/cache/ftcsbits.c
@@ -401,6 +401,8 @@
   }
 
 
+#ifdef FTC_INLINE
+
   FT_LOCAL_DEF( FT_Bool )
   FTC_SNode_Compare( FTC_SNode   snode,
                      FTC_GQuery  gquery,
@@ -409,5 +411,6 @@
     return ftc_snode_compare( FTC_NODE( snode ), gquery, cache );
   }
 
+#endif
 
 /* END */
diff --git a/src/cache/ftcsbits.h b/src/cache/ftcsbits.h
index 6261745..336aa9b 100644
--- a/src/cache/ftcsbits.h
+++ b/src/cache/ftcsbits.h
@@ -83,11 +83,15 @@ FT_BEGIN_HEADER
 #endif
 
 
+#ifdef FTC_INLINE
+
   FT_LOCAL( FT_Bool )
   FTC_SNode_Compare( FTC_SNode   snode,
                      FTC_GQuery  gquery,
                      FTC_Cache   cache );
 
+#endif
+
   /* */
 
 FT_END_HEADER