Improve how we deal with CLAP_VERSION
@@ -9,6 +9,9 @@ extern "C" {
#endif
typedef struct clap_version {
+ // This is the major ABI and API design
+ // Version 0.X.Y correspond to the development stage, API and ABI are not stable
+ // Version 1.X.Y correspont to the release stage, API and ABI are stable
int major;
int minor;
int revision;
@@ -16,13 +19,10 @@ typedef struct clap_version {
static const clap_version CLAP_VERSION = {0, 7, 0};
-static CLAP_CONSTEXPR bool clap_version_is_compatible(const clap_version& v)
-{
+static CLAP_CONSTEXPR bool clap_version_is_compatible(const clap_version &v) {
+ // For version 0, we require the same minor version because we may still break the ABI at this point
if (v.major == 0 && CLAP_VERSION.major == 0)
- return v.minor == CLAP_VERSION.major;
-
- if (v.major == 1 && CLAP_VERSION.major == 1)
- return true;
+ return v.minor == CLAP_VERSION.minor;
return false;
}
