Furthermore, say I'm using Weston 1.3.91... a usage of WESTON_VERSION_COMPATIBLE_WITH(1,3,0) would return True (1), which is wrong since the API/ABI actually changed somewhere between 1.3.90 and 1.3.91.
Granted, most API/ABI consumers won't be using x.y.9z development version series. But, as it's written now, they would be forced to add an extra check for every major/minor release if they are supporting more than one API/ABI. Our usage model, however, is for the wayland-fits test suite where it needs to support unstable (development versions) and stable API/ABI in a continuous integration environment. Regardless, the macro logic needs to change so that it appropriately reflects the macro name. > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of Eoff, > Ullysses A > Sent: Friday, January 24, 2014 1:05 PM > To: Daniel Stone > Cc: [email protected] > Subject: RE: [PATCH 1/2 v2] version: Fix WESTON_VERSION_AT_LEAST macro > > Even with just a rename, if the API/ABI doesn't change from 1.4.x to 1.5.x > the macro wouldn't work if you used WESTON_VERSION_COMPATIBLE_WITH(1,4,0) > when version == 1.5.0 as it's written now. > > That is, with a rename, the logic indicates that "No major or minor > release is compatible with another major or minor release", regardless of > API/ABI changes. > > > -----Original Message----- > > From: Daniel Stone [mailto:[email protected]] > > Sent: Friday, January 24, 2014 12:37 PM > > To: Eoff, Ullysses A > > Cc: [email protected] > > Subject: Re: [PATCH 1/2 v2] version: Fix WESTON_VERSION_AT_LEAST macro > > > > Hi, > > The macro should really be called WESTON_VERSION_COMPATIBLE_WITH() - > > it's done that way specifically to allow breaking API/ABI at least > > every minor release. > > > > Cheers, > > Daniel > > > > On 24 January 2014 19:11, U. Artie Eoff <[email protected]> wrote: > > > From: "U. Artie Eoff" <[email protected]> > > > > > > Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=74023 > > > > > > Signed-off-by: U. Artie Eoff <[email protected]> > > > --- > > > src/version.h.in | 9 +++++---- > > > 1 file changed, 5 insertions(+), 4 deletions(-) > > > > > > diff --git a/src/version.h.in b/src/version.h.in > > > index 79dba45..e72fea8 100644 > > > --- a/src/version.h.in > > > +++ b/src/version.h.in > > > @@ -30,8 +30,9 @@ > > > > > > /* Can be used like #if WESTON_VERSION_AT_LEAST(1, 2, 0) */ > > > #define WESTON_VERSION_AT_LEAST(major, minor, micro) \ > > > - (WESTON_VERSION_MAJOR == (major) && \ > > > - WESTON_VERSION_MINOR == (minor) && \ > > > - WESTON_VERSION_MICRO >= (micro)) > > > - > > > + ((WESTON_VERSION_MAJOR != major) ? \ > > > + (WESTON_VERSION_MAJOR > major) : \ > > > + ((WESTON_VERSION_MINOR != minor) ? \ > > > + (WESTON_VERSION_MINOR > minor) : \ > > > + (WESTON_VERSION_MICRO >= micro))) > > > #endif > > > -- > > > 1.8.3.1 > > > > > > _______________________________________________ > > > wayland-devel mailing list > > > [email protected] > > > http://lists.freedesktop.org/mailman/listinfo/wayland-devel > _______________________________________________ > wayland-devel mailing list > [email protected] > http://lists.freedesktop.org/mailman/listinfo/wayland-devel _______________________________________________ wayland-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/wayland-devel
