summaryrefslogtreecommitdiff
path: root/Build/source/libs/freetype2/freetype-src/include/freetype/config/public-macros.h
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2021-12-03 04:03:12 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2021-12-03 04:03:12 +0000
commit4ee9d04bd5d518e5f1f86875f4f8184fc0552f44 (patch)
tree4f27c2cc7196ba469bf631ffe0460cb3d6bcbc9d /Build/source/libs/freetype2/freetype-src/include/freetype/config/public-macros.h
parent39bd39ea6f91fb51d118264f372905de9accc347 (diff)
freetype 2.11.1
git-svn-id: svn://tug.org/texlive/trunk@61211 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/freetype2/freetype-src/include/freetype/config/public-macros.h')
-rw-r--r--Build/source/libs/freetype2/freetype-src/include/freetype/config/public-macros.h18
1 files changed, 18 insertions, 0 deletions
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<type>(var)
+#define FT_REINTERPRET_CAST( type, var ) reinterpret_cast<type>(var)
+
+#define FT_STATIC_BYTE_CAST( type, var ) \
+ static_cast<type>( static_cast<unsigned char>( 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_ */