ref: 3cc88e2e44f1db959bb0146d798d261f104846d1
parent: 1063690174cbd6752a280e0881016ccd0134b466
author: Werner Lemberg <[email protected]>
date: Wed Dec 27 03:19:09 EST 2017
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.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,21 @@
2017-12-27 Werner Lemberg <[email protected]>
+ 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 <[email protected]>
+
Provide support for intra-module callback functions.
This is needed especially for `make multi' with C++.
--- 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
--- a/include/freetype/internal/fttrace.h
+++ b/include/freetype/internal/fttrace.h
@@ -39,6 +39,7 @@
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.) */
--- 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;