From 4ee9d04bd5d518e5f1f86875f4f8184fc0552f44 Mon Sep 17 00:00:00 2001 From: Akira Kakuto Date: Fri, 3 Dec 2021 04:03:12 +0000 Subject: freetype 2.11.1 git-svn-id: svn://tug.org/texlive/trunk@61211 c570f23f-e606-0410-a88d-b1316a301751 --- .../include/freetype/config/public-macros.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'Build/source/libs/freetype2/freetype-src/include/freetype/config/public-macros.h') diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/config/public-macros.h b/Build/source/libs/freetype2/freetype-src/include/freetype/config/public-macros.h index 51fbc9c2f52..9fbb3274a0e 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/config/public-macros.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/config/public-macros.h @@ -103,6 +103,7 @@ FT_BEGIN_HEADER */ #define FT_EXPORT( x ) FT_PUBLIC_FUNCTION_ATTRIBUTE extern x + /* * `FT_UNUSED` indicates that a given parameter is not used -- this is * only used to get rid of unpleasant compiler warnings. @@ -115,6 +116,23 @@ FT_BEGIN_HEADER #endif + /* + * Support for casts in both C and C++. + */ +#ifdef __cplusplus +#define FT_STATIC_CAST( type, var ) static_cast(var) +#define FT_REINTERPRET_CAST( type, var ) reinterpret_cast(var) + +#define FT_STATIC_BYTE_CAST( type, var ) \ + static_cast( static_cast( var ) ) +#else +#define FT_STATIC_CAST( type, var ) (type)(var) +#define FT_REINTERPRET_CAST( type, var ) (type)(var) + +#define FT_STATIC_BYTE_CAST( type, var ) (type)(unsigned char)(var) +#endif + + FT_END_HEADER #endif /* FREETYPE_CONFIG_PUBLIC_MACROS_H_ */ -- cgit v1.2.3