Commit 3cc88e2e44f1db959bb0146d798d261f104846d1

Werner Lemberg 2017-12-27T08:19:09

Fixes for `make multi'. * include/freetype/internal/ftpsprop.h: Use `FT_BASE_CALLBACK'. (ps_property_get): Harmonize declaration with corresponding function typedef. * include/freety[e/internal/fttrace.h: Add `trace_psprops'. * src/base/ftpsprop.c: Include necessary header files. (FT_COMPONENT): Define. (ps_property_set): Tag with `FT_BASE_CALLBACK_DEF'. (ps_property_get): Tag with `FT_BASE_CALLBACK_DEF'. Harmonize declaration with corresponding function typedef.

diff --git a/ChangeLog b/ChangeLog
index f9a4693..a2ff9ff 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,21 @@
 2017-12-27  Werner Lemberg  <wl@gnu.org>
 
+	Fixes for `make multi'.
+
+	* include/freetype/internal/ftpsprop.h: Use `FT_BASE_CALLBACK'.
+	(ps_property_get): Harmonize declaration with corresponding
+	function typedef.
+
+	* include/freety[e/internal/fttrace.h: Add `trace_psprops'.
+
+	* src/base/ftpsprop.c: Include necessary header files.
+	(FT_COMPONENT): Define.
+	(ps_property_set): Tag with `FT_BASE_CALLBACK_DEF'.
+	(ps_property_get): Tag with `FT_BASE_CALLBACK_DEF'.
+	Harmonize declaration with corresponding function typedef.
+
+2017-12-27  Werner Lemberg  <wl@gnu.org>
+
 	Provide support for intra-module callback functions.
 
 	This is needed especially for `make multi' with C++.
diff --git a/include/freetype/internal/ftpsprop.h b/include/freetype/internal/ftpsprop.h
index cbd2874..cb818df 100644
--- a/include/freetype/internal/ftpsprop.h
+++ b/include/freetype/internal/ftpsprop.h
@@ -27,16 +27,16 @@
 FT_BEGIN_HEADER
 
 
-  FT_Error
+  FT_BASE_CALLBACK( FT_Error )
   ps_property_set( FT_Module    module,         /* PS_Driver */
                    const char*  property_name,
                    const void*  value,
                    FT_Bool      value_is_string );
 
-  FT_Error
+  FT_BASE_CALLBACK( FT_Error )
   ps_property_get( FT_Module    module,         /* PS_Driver */
                    const char*  property_name,
-                   const void*  value );
+                   void*        value );
 
 
 FT_END_HEADER
diff --git a/include/freetype/internal/fttrace.h b/include/freetype/internal/fttrace.h
index 9a922f1..cc52e08 100644
--- a/include/freetype/internal/fttrace.h
+++ b/include/freetype/internal/fttrace.h
@@ -39,6 +39,7 @@ FT_TRACE_DEF( mm )        /* MM interface            (ftmm.c)     */
 FT_TRACE_DEF( raccess )   /* resource fork accessor  (ftrfork.c)  */
 FT_TRACE_DEF( synth )     /* bold/slant synthesizer  (ftsynth.c)  */
 FT_TRACE_DEF( bitmap )    /* bitmap checksum         (ftobjs.c)   */
+FT_TRACE_DEF( psprops )   /* PS driver properties    (ftpsprop.c) */
 
   /* Cache sub-system */
 FT_TRACE_DEF( cache )     /* cache sub-system        (ftcache.c, etc.) */
diff --git a/src/base/ftpsprop.c b/src/base/ftpsprop.c
index b146eab..790127b 100644
--- a/src/base/ftpsprop.c
+++ b/src/base/ftpsprop.c
@@ -17,8 +17,24 @@
 /***************************************************************************/
 
 
+#include <ft2build.h>
+#include FT_DRIVER_H
+#include FT_INTERNAL_DEBUG_H
+#include FT_INTERNAL_POSTSCRIPT_AUX_H
+#include FT_INTERNAL_OBJECTS_H
 
-  FT_Error
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */
+  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */
+  /* messages during execution.                                            */
+  /*                                                                       */
+#undef  FT_COMPONENT
+#define FT_COMPONENT  trace_psprops
+
+
+  FT_BASE_CALLBACK_DEF( FT_Error )
   ps_property_set( FT_Module    module,         /* PS_Driver */
                    const char*  property_name,
                    const void*  value,
@@ -210,10 +226,10 @@
   }
 
 
-  FT_Error
+  FT_BASE_CALLBACK_DEF( FT_Error )
   ps_property_get( FT_Module    module,         /* PS_Driver */
                    const char*  property_name,
-                   const void*  value )
+                   void*        value )
   {
     FT_Error   error  = FT_Err_Ok;
     PS_Driver  driver = (PS_Driver)module;