From d27f7669bbf7f0d9e2a2b1fb68c5c5c68c533a2a Mon Sep 17 00:00:00 2001 From: jdeokkim Date: Mon, 11 Nov 2024 18:26:34 +0900 Subject: [PATCH] Add `FR_API_VERSION` macro constant to include/ferox.h --- include/ferox.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/include/ferox.h b/include/ferox.h index 199a7c8..30a731d 100644 --- a/include/ferox.h +++ b/include/ferox.h @@ -79,6 +79,19 @@ extern "C" { /* Macros =================================================================> */ +/* The major, minor, and the patch release version of this library. */ +#define FR_API_VERSION_MAJOR 0 +#define FR_API_VERSION_MINOR 10 +#define FR_API_VERSION_PATCH 0 + +/* The full version string of this library. */ +#define FR_API_VERSION \ + FR_API_STRINGIFY(FR_API_VERSION_MAJOR) "." \ + FR_API_STRINGIFY(FR_API_VERSION_MINOR) "." \ + FR_API_STRINGIFY(FR_API_VERSION_PATCH) + +/* ========================================================================> */ + /* Compiler-specific attribute for a function that must be inlined. */ #ifndef FR_API_INLINE #ifdef _MSC_VER @@ -94,6 +107,10 @@ extern "C" { #endif #endif // `FR_API_INLINE` +/* Converts the given value to a string literal. */ +#define FR_API_STRINGIFY_(x) #x +#define FR_API_STRINGIFY(x) FR_API_STRINGIFY_(x) + /* ========================================================================> */ /* Empty-initializes the given object. */