README: Delete misleading API-versioning section
All of this sounded nice, but none of this was true. Signed-off-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
parent
f825def623
commit
1a94c4a3cb
40
README.md
40
README.md
@ -218,46 +218,6 @@ Depending only on libweston-3 without a specific version number still allows
|
||||
pre-releases which might have different API or ABI.
|
||||
|
||||
|
||||
Forward compatibility
|
||||
---------------------
|
||||
|
||||
Inspired by ATK, Qt and KDE programs/libraries, libjpeg-turbo, GDK,
|
||||
NetworkManager, js17, lz4 and many others, libweston uses a macro to restrict
|
||||
the API visible to the developer - REQUIRE_LIBWESTON_API_VERSION.
|
||||
|
||||
Note that different projects focus on different aspects - upper and/or lower
|
||||
version check, default to visible/hidden old/new symbols and so on.
|
||||
|
||||
libweston aims to guard all newly introduced API, in order to prevent subtle
|
||||
breaks that a simple recompile (against a newer version) might cause.
|
||||
|
||||
The macro is of the format 0x$MAJOR$MINOR and does not include PATCH version.
|
||||
As mentioned in the Versioning scheme section, the latter does not reflect any
|
||||
user visible API changes, thus should be not considered part of the API version.
|
||||
|
||||
All new symbols should be guarded by the macro like the example given below:
|
||||
|
||||
~~~~
|
||||
#if REQUIRE_LIBWESTON_API_VERSION >= 0x0101
|
||||
|
||||
bool
|
||||
weston_ham_sandwich(void);
|
||||
|
||||
#endif
|
||||
~~~~
|
||||
|
||||
In order to use the said symbol, the one will have a similar code in their
|
||||
configure.ac:
|
||||
|
||||
~~~~
|
||||
PKG_CHECK_MODULES(LIBWESTON, [libweston-1 >= 1.1])
|
||||
AC_DEFINE(REQUIRE_LIBWESTON_API_VERSION, [0x0101])
|
||||
~~~~
|
||||
|
||||
If the user is _not_ interested in forward compatibility, they can use 0xffff
|
||||
or similar high value. Yet doing so is not recommended.
|
||||
|
||||
|
||||
Libweston design goals
|
||||
----------------------
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user