stumpless_version_to_string

Function stumpless_version_to_string 

Source
pub unsafe extern "C" fn stumpless_version_to_string(
    version: *const stumpless_version,
) -> *mut c_char
Expand description

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.

@param version The version to convert to a string.

@return A string representation of the provided version. This should be destroyed via the memory deallocation function currently configured via stumpless_set_free(). If an error is encountered, then NULL is returned and an error code is set appropriately.