diff options
Diffstat (limited to 'libdimension/dimension.h')
-rw-r--r-- | libdimension/dimension.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libdimension/dimension.h b/libdimension/dimension.h index 9f7fd67..73cab50 100644 --- a/libdimension/dimension.h +++ b/libdimension/dimension.h @@ -44,6 +44,21 @@ extern "C" { #endif +/* Common macros */ + +/** + * @internal + * @def DMNSN_FUNC + * @brief Expands to the name of the current function + */ +#ifdef __GNUC__ + #define DMNSN_FUNC __PRETTY_FUNCTION__ +#elif __STDC_VERSION__ >= 199901L + #define DMNSN_FUNC __func__ +#else + #define DMNSN_FUNC "<unknown function>" +#endif + /* Common types */ /** |