mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-11 22:08:14 +00:00
build: Mechanically generate ABI versions from version number
If we're strict about applying something resembling semantic versioning to the "marketing" version number, then we can mechanically generate the ABI version from it. This limits the range of valid micro versions (patchlevels) to 0-99. Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:

committed by
Sam Lantinga

parent
60d702ac74
commit
fff97c95eb
@@ -80,13 +80,8 @@ SDL_COMPILE_TIME_ASSERT(SDL_MINOR_VERSION_min, SDL_MINOR_VERSION >= 0);
|
||||
SDL_COMPILE_TIME_ASSERT(SDL_MINOR_VERSION_max, SDL_MINOR_VERSION <= 255);
|
||||
|
||||
SDL_COMPILE_TIME_ASSERT(SDL_PATCHLEVEL_min, SDL_PATCHLEVEL >= 0);
|
||||
#if SDL_MAJOR_VERSION < 3
|
||||
/* Limited by its encoding in SDL_VERSIONNUM */
|
||||
/* Limited by its encoding in SDL_VERSIONNUM and in the ABI versions */
|
||||
SDL_COMPILE_TIME_ASSERT(SDL_PATCHLEVEL_max, SDL_PATCHLEVEL <= 99);
|
||||
#else
|
||||
/* Limited only by the need to fit in SDL_version */
|
||||
SDL_COMPILE_TIME_ASSERT(SDL_PATCHLEVEL_max, SDL_PATCHLEVEL <= 255);
|
||||
#endif
|
||||
|
||||
/* This is not declared in any header, although it is shared between some
|
||||
parts of SDL, because we don't want anything calling it without an
|
||||
|
Reference in New Issue
Block a user