|
TR_datastructures 0.1.0
A generic C data structures library
|
Version information for the tr_datastructures library. More...
Go to the source code of this file.
Macros | |
| #define | TR_VERSION_MAJOR 0 |
| #define | TR_VERSION_MINOR 1 |
| #define | TR_VERSION_PATCH 0 |
| #define | TR_VERSION_STRING "0.1.0" |
| #define | TR_VERSION_ENCODE(major, minor, patch) (((major) << 16) | ((minor) << 8) | (patch)) |
| Encodes major, minor and patch into a single integer. | |
| #define | TR_VERSION TR_VERSION_ENCODE(TR_VERSION_MAJOR, TR_VERSION_MINOR, TR_VERSION_PATCH) |
| Current library version encoded as a single integer. | |
| #define | TR_VERSION_AT_LEAST(major, minor, patch) (TR_VERSION >= TR_VERSION_ENCODE(major, minor, patch)) |
| Checks if the current version is at least major.minor.patch. | |
Version information for the tr_datastructures library.
This file is automatically generated by CMake from cmake/tr_version.h.in — do not edit manually. The version numbers are taken directly from the VERSION field in the root CMakeLists.txt.
Example usage:
| #define TR_VERSION TR_VERSION_ENCODE(TR_VERSION_MAJOR, TR_VERSION_MINOR, TR_VERSION_PATCH) |
Current library version encoded as a single integer.
Combines TR_VERSION_MAJOR, TR_VERSION_MINOR and TR_VERSION_PATCH into a single integer using TR_VERSION_ENCODE. Use with TR_VERSION_AT_LEAST for version checks.
Example:
| #define TR_VERSION_AT_LEAST | ( | major, | |
| minor, | |||
| patch | |||
| ) | (TR_VERSION >= TR_VERSION_ENCODE(major, minor, patch)) |
Checks if the current version is at least major.minor.patch.
The recommended way to perform compile time version checks. Evaluates to 1 if the current library version is greater than or equal to the specified version, 0 otherwise.
Example:
| major | Required major version |
| minor | Required minor version |
| patch | Required patch version |
| #define TR_VERSION_ENCODE | ( | major, | |
| minor, | |||
| patch | |||
| ) | (((major) << 16) | ((minor) << 8) | (patch)) |
Encodes major, minor and patch into a single integer.
Packs three version components into a single 32 bit integer for easy numerical comparison. The encoding is:
Example — version 1.2.3 encodes to 0x00010203:
| major | Major version component |
| minor | Minor version component |
| patch | Patch version component |