summaryrefslogtreecommitdiff
path: root/src/codegen
diff options
context:
space:
mode:
Diffstat (limited to 'src/codegen')
-rw-r--r--src/codegen/compat.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/codegen/compat.h b/src/codegen/compat.h
index 423b1d9..f34d612 100644
--- a/src/codegen/compat.h
+++ b/src/codegen/compat.h
@@ -4,20 +4,20 @@
#ifdef __cplusplus
/* C++ mode */
-#define ZC_AUTO auto
-#define ZC_CAST(T, x) static_cast<T>(x)
-#define ZC_REINTERPRET(T, x) reinterpret_cast<T>(x)
-#define ZC_EXTERN_C extern "C"
+#define ZC_AUTO auto ///< Auto type inference.
+#define ZC_CAST(T, x) static_cast<T>(x) ///< Static cast.
+#define ZC_REINTERPRET(T, x) reinterpret_cast<T>(x) ///< Reinterpret cast.
+#define ZC_EXTERN_C extern "C" ///< Extern "C" linkage.
#define ZC_EXTERN_C_BEGIN \
extern "C" \
{
#define ZC_EXTERN_C_END }
#else
/* C mode */
-#define ZC_AUTO __auto_type
-#define ZC_CAST(T, x) ((T)(x))
-#define ZC_REINTERPRET(T, x) ((T)(x))
-#define ZC_EXTERN_C
+#define ZC_AUTO __auto_type ///< Auto type inference.
+#define ZC_CAST(T, x) ((T)(x)) ///< Explicit cast.
+#define ZC_REINTERPRET(T, x) ((T)(x)) ///< Reinterpret cast.
+#define ZC_EXTERN_C ///< Extern "C" (no-op in C).
#define ZC_EXTERN_C_BEGIN
#define ZC_EXTERN_C_END
#endif