clap

CLAP Audio Plugin API
Log | Files | Refs | README | LICENSE

commit f39973f2c61dd588f41271d27edcfa73dd6d4730
parent ecea994588c735cd09eb9ba6178c7c4e8ca11956
Author: Alexandre BIQUE <bique.alexandre@gmail.com>
Date:   Tue, 29 Jun 2021 17:43:29 +0200

Improve how we deal with CLAP_VERSION

Diffstat:
Minclude/clap/version.h | 12++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/include/clap/version.h b/include/clap/version.h @@ -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; }