Cleanup
[carla.git] / source / includes / clap / version.h
blob7005ad4a8969112202885bf7affcc6b8da0ea840
1 #pragma once
3 #include "private/macros.h"
4 #include "private/std.h"
6 #ifdef __cplusplus
7 extern "C" {
8 #endif
10 typedef struct clap_version {
11 // This is the major ABI and API design
12 // Version 0.X.Y correspond to the development stage, API and ABI are not stable
13 // Version 1.X.Y correspont to the release stage, API and ABI are stable
14 uint32_t major;
15 uint32_t minor;
16 uint32_t revision;
17 } clap_version_t;
19 #ifdef __cplusplus
21 #endif
23 #define CLAP_VERSION_MAJOR ((uint32_t)1)
24 #define CLAP_VERSION_MINOR ((uint32_t)1)
25 #define CLAP_VERSION_REVISION ((uint32_t)1)
26 #define CLAP_VERSION_INIT {CLAP_VERSION_MAJOR, CLAP_VERSION_MINOR, CLAP_VERSION_REVISION}
28 static const CLAP_CONSTEXPR clap_version_t CLAP_VERSION = CLAP_VERSION_INIT;
30 CLAP_NODISCARD static inline CLAP_CONSTEXPR bool
31 clap_version_is_compatible(const clap_version_t v) {
32 // versions 0.x.y were used during development stage and aren't compatible
33 return v.major >= 1;