stumpless 2.2.0
|
Runtime information about the library. 更多...
结构体 | |
struct | stumpless_version |
A description of a library version. 更多... | |
函数 | |
struct stumpless_version * | stumpless_get_version (void) |
Gets the version of code the library was built with. | |
int | stumpless_version_cmp (const struct stumpless_version *version_x, const struct stumpless_version *version_y) |
Compares the version of two given stumpless_version struct. | |
char * | stumpless_version_to_string (const struct stumpless_version *version) |
Creates a string representation of the given version. | |
Runtime information about the library.
struct stumpless_version * stumpless_get_version | ( | void | ) |
Gets the version of code the library was built with.
This version must be freed by the caller when it is no longer needed to avoid a memory leak.
Thread Safety: MT-Safe This function is thread safe.
Async Signal Safety: AS-Unsafe heap This function is not safe to call from signal handlers due to the use of memory management functions to create the version structure.
Async Cancel Safety: AC-Unsafe heap This function is not safe to call from threads that may be asynchronously cancelled, due to the use of memory management functions.
int stumpless_version_cmp | ( | const struct stumpless_version * | version_x, |
const struct stumpless_version * | version_y ) |
Compares the version of two given stumpless_version struct.
This function makes use of a similar convention used by the standard library's strcmp function.
Thread Safety: MT-Safe race:version_x race:version_y This function is thread safe, as long as the versions to be compared are not modified by other threads during the call.
Async Signal Safety: AS-Safe This function is safe to call from signal handlers.
Async Cancel Safety: AC-Safe This function is safe to call from threads that may be asynchronously cancelled.
version_x,version_y | Two given version(const) to be compared. |
char * stumpless_version_to_string | ( | const struct stumpless_version * | version | ) |
Creates a string representation of the given version.
This string will be NULL-terminated, and will appear in the standard semantic versioning format of 'major.minor.patch'.
This string must be freed by the caller when it is no longer needed. Failing to do so will result in a memory leak of the returned string.
Thread Safety: MT-Safe race:version This function is thread safe, as long as the version is not modified by other threads during the call.
Async Signal Safety: AS-Safe This function is safe to call from signal handlers.
Async Cancel Safety: AC-Safe This function is safe to call from threads that may be asynchronously cancelled.
version | The version to convert to a string. |