diff --git a/[priyesh]ChangeLog b/[priyesh]ChangeLog index ef306acc2..29f1547a2 100644 --- a/[priyesh]ChangeLog +++ b/[priyesh]ChangeLog @@ -1,3 +1,11 @@ +2020-08-12 Priyesh Kumar + + Bug fix on Windows. + + * include/freetype/internal/ftdebug.h: Store the name of current + `FT_COMPONENT' and then pass it to the functions `ft_add_tag()' and + `ft_remove_tag()' + 2020-08-06 Priyesh Kumar [build] Fix MinGW errors while building dlg with FreeType on Windows. diff --git a/include/freetype/internal/ftdebug.h b/include/freetype/internal/ftdebug.h index b070476cf..7ba06b4af 100644 --- a/include/freetype/internal/ftdebug.h +++ b/include/freetype/internal/ftdebug.h @@ -113,11 +113,15 @@ FT_BEGIN_HEADER #ifdef FT_LOGGING + +#define FT_LOGGING_TAG( x ) FT_LOGGING_TAG_( x ) +#define FT_LOGGING_TAG_( x ) #x + #define FT_LOG( level, varformat ) \ do \ { \ - ft_add_tag( FT_LOGGING_TAG( FT_COMPONENT ) ); \ - \ + const char* ft_component = FT_LOGGING_TAG( FT_COMPONENT ); \ + ft_add_tag(ft_component ); \ if( ft_trace_levels[FT_TRACE_COMP( FT_COMPONENT )] >= level ) \ { \ if( custom_output_handler != NULL ) \ @@ -125,8 +129,7 @@ FT_BEGIN_HEADER else \ dlg_trace varformat; \ } \ - \ - ft_remove_tag( FT_LOGGING_TAG( FT_COMPONENT ) ); \ + ft_remove_tag( ft_component ); \ }while( 0 ) #else @@ -147,9 +150,6 @@ FT_BEGIN_HEADER #ifdef FT_DEBUG_LEVEL_TRACE -#define FT_LOGGING_TAG( x ) FT_LOGGING_TAG_( x ) -#define FT_LOGGING_TAG_( x ) #x - /*function to add dlg tag*/ FT_BASE( void ) ft_add_tag( const char* tag );