Version

struct UVersion

Version information.

Public Members

unsigned major

Major revision.

unsigned minor

Minor revision.

unsigned patch

Patch number.

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 than rhs, 0 if they are equal, 1 if lhs is greater than rhs.

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.

Library version

UVersion ulib_get_version(void)

Returns the version of the library.

Returns:

Library version.