summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPriyesh Kumar <priyeshkkumar@gmail.com>2020-08-12 07:44:15 +0530
committerPriyesh Kumar <priyeshkkumar@gmail.com>2020-08-12 07:44:15 +0530
commit84c719491fa90d58077f226133ae7611b5cbfe61 (patch)
tree6d617913c5d36fbbe57a51224a419902773dbafa
parent141ac5301b45ec9a22fb645df635fd4fec2564d8 (diff)
downloadfreetype2-84c719491fa90d58077f226133ae7611b5cbfe61.tar.gz
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()'
-rw-r--r--[priyesh]ChangeLog8
-rw-r--r--include/freetype/internal/ftdebug.h14
2 files changed, 15 insertions, 7 deletions
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 <priyeshkkumar@gmail.com>
+
+ 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 <priyeshkkumar@gmail.com>
[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 );