Version
-
struct UVersion
Version information.
-
UVersion uversion(unsigned major, unsigned minor, unsigned patch)
Initializes a version struct.
- Parameters:
major – Major revision.
minor – Minor revision.
patch – Patch number.
- Returns:
Initialized version struct.
-
int uversion_compare(UVersion lhs, UVersion rhs)
Compares lhs and rhs.
- Parameters:
lhs – First version.
rhs – Second version.
- Returns:
-1 if
lhs
is smaller thanrhs
, 0 if they are equal, 1 iflhs
is greater thanrhs
.
-
UString uversion_to_string(UVersion const *version)
Converts the version into a string.
Note
The returned object must be destroyed by calling
ustring_deinit()
.- Parameters:
version – Version.
- Returns:
String.