[PATCH] version.h: Add version check macro
Bill Spitzak
spitzak at gmail.com
Tue Sep 24 12:52:33 PDT 2013
Kristian Høgsberg wrote:
> On Tue, Sep 24, 2013 at 12:54 AM, Marc Chalain <marc.chalain at gmail.com> wrote:
>
>> But the WESTON_VERSION_AT_LEAST macro is wrong. You can check only the minor
>> and not the rest of the version.
>>
>
> No, we don't guarantee plugin API stability between x.y releases, only
> micro releases 1.2.x maintain that interface. Something developed for
> 1.1.2 isn't guaranteed to work on 1.2.1, but anything written against
> 1.2.1 will work on 1.2.2 and later 1.2.x releases.
That does not seem right. This will require anybody writing a plugin
using a feature added in 1.2.3 and never removed to do this:
#if WESTON_VERSION_AT_LEAST(1,2,3) || WESTON_VERSION_AT_LEAST(1,3,0) ||
WESTON_VERSION_AT_LEAST(1,4,0) || WESTON_VERSION_AT_LEAST(1,5,0) || ....etc
If this macro was written the way I think most people expect, then in
the case something vanishes in 1.3.0 they can write:
#if WESTON_VERSION_AT_LEAST(1,3,0)
... it is missing (but there may be a better replacement) ...
#elif WESTON_VERSION_AT_LEAST(1,2,3)
... use the api ...
#else
... it is missing ...
#endif
More information about the wayland-devel
mailing list