Zth (libzth)
Loading...
Searching...
No Matches
version.h
Go to the documentation of this file.
1#ifndef ZTH_VERSION_H
2#define ZTH_VERSION_H
3/*
4 * SPDX-FileCopyrightText: 2019-2026 Jochem Rutgers
5 *
6 * SPDX-License-Identifier: MPL-2.0
7 */
8
9#include <libzth/util.h>
10
11// clang-format off
12#define ZTH_VERSION_MAJOR 2
13#define ZTH_VERSION_MINOR 0
14#define ZTH_VERSION_PATCH 0
15#define ZTH_VERSION_SUFFIX "-alpha"
16// clang-format on
17
44#define ZTH_VERSION \
45 ZTH_STRINGIFY(ZTH_VERSION_MAJOR) \
46 "." ZTH_STRINGIFY(ZTH_VERSION_MINOR) "." ZTH_STRINGIFY(ZTH_VERSION_PATCH) ZTH_VERSION_SUFFIX
47
57#define ZTH_VERSION_NUM (ZTH_VERSION_MAJOR * 10000L + ZTH_VERSION_MINOR * 100L + ZTH_VERSION_PATCH)
58
59#ifdef __cplusplus
60namespace zth {
65ZTH_EXPORT constexpr inline char const* version() noexcept
66{
67 return ZTH_VERSION;
68}
69} // namespace zth
70
76EXTERN_C ZTH_EXPORT ZTH_INLINE char const* zth_version() noexcept
77{
78 return zth::version();
79}
80#else // !__cplusplus
81ZTH_EXPORT char const* zth_version();
82#endif // __cplusplus
83
84#endif // ZTH_VERSION_H
char const * zth_version() noexcept
Returns the version of Zth.
Definition version.h:76
constexpr char const * version() noexcept
Returns the version of Zth.
Definition version.h:65
#define ZTH_VERSION
Zth version as string literal.
Definition version.h:44
#define ZTH_INLINE
Definition macros.h:129