small c++ breakage in current freetype git HEAD

Hin-Tak Leung <[email protected]> Mon, 6 May 2024 18:12:58 +0000 (UTC)
Newsgroups gmane.comp.fonts.freetype.devel
Message-ID <[email protected]>
Hi,

I have upgraded to fc40 last week, and there has been some breakage of skia-python against current skia lately, so I thought I'd update and rebuild the skia-enabled ft2-demos, now ported over to github CI against freetype git head. (next e-mail). Since skia is c++, requires setting CC=c++. Found a small breakage in current freetype git head after 2.13.2 . Diff attached - should be obvious.

The actual error is that "enum" is a proper type in c++, and not equivalent to "int" (as in c), so must be casted as such.

Hin-Tak
freetype2.diff (text/x-patch, 592 B)
diff --git a/include/freetype/internal/psaux.h b/include/freetype/internal/psaux.h
index 41f481d5a..1827219f7 100644
--- a/include/freetype/internal/psaux.h
+++ b/include/freetype/internal/psaux.h
@@ -359,7 +359,7 @@ FT_BEGIN_HEADER
 #define T1_FIELD_CALLBACK( _ident, _name, _dict )       \
           T1_NEW_CALLBACK_FIELD( _ident, _name, _dict )
 
-#define T1_FIELD_ZERO  { 0, NULL, 0, 0, NULL, 0, 0, 0, 0, 0 }
+#define T1_FIELD_ZERO  { 0, NULL, (T1_FieldLocation)0, (T1_FieldType)0, NULL, 0, 0, 0, 0, 0 }
 
 
   /*************************************************************************/