HomeClusterLabs Projects

Refactor: libcrmcommon: New pcmk__compare_versions()
5bca76d61da1Unpublished

Unpublished Commit ยท Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.
This commit no longer exists in the repository. It may have been part of a branch which was deleted.This commit has been deleted in the repository: it is no longer reachable from any branch, tag, or ref.

Description

Refactor: libcrmcommon: New pcmk__compare_versions()

To replace compare_version()

The next commit replaces this with a regex implementation that I think I
like better. We can squash the commits if we decide to use that.

We could also take a middle ground approach of splitting each version
string on dots using g_strsplit() and then parsing each segment that
way, without involving a regex. All we'd have to do is iterate over each
segment to make sure it's only digits. Not sure which one is more
readable. Probably the regex approach, but regex.h functions are pretty
ugly.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>

Details

Provenance
nrwahl2Authored on Mar 24 2025, 7:21 AM

Event Timeline

Commit No Longer Exists

This commit no longer exists in the repository.