Compare commits
2 Commits
eb5c6b49d6
...
131619ae4b
Author | SHA1 | Date |
---|---|---|
Doug Freed | 131619ae4b | |
Doug Freed | 08db74c474 |
|
@ -76,7 +76,7 @@ routines.
|
|||
|
||||
:param char* a: The first version to compare in the pair.
|
||||
:param char* b: The second version to compare in the pair.
|
||||
:return: -1 if the first version is greater, 0 if both versions are equal, 1 if the second version is greater.
|
||||
:return: -1 if the first version is less than, 0 if both versions are equal, 1 if the second version is less than.
|
||||
:rtype: int
|
||||
|
||||
.. c:function:: pkgconf_pkg_t *pkgconf_builtin_pkg_get(const char *name)
|
||||
|
|
|
@ -826,7 +826,7 @@ out:
|
|||
*
|
||||
* :param char* a: The first version to compare in the pair.
|
||||
* :param char* b: The second version to compare in the pair.
|
||||
* :return: -1 if the first version is greater, 0 if both versions are equal, 1 if the second version is greater.
|
||||
* :return: -1 if the first version is less than, 0 if both versions are equal, 1 if the second version is less than.
|
||||
* :rtype: int
|
||||
*/
|
||||
int
|
||||
|
@ -841,10 +841,10 @@ pkgconf_compare_version(const char *a, const char *b)
|
|||
|
||||
/* optimization: if version matches then it's the same version. */
|
||||
if (a == NULL)
|
||||
return 1;
|
||||
return -1;
|
||||
|
||||
if (b == NULL)
|
||||
return -1;
|
||||
return 1;
|
||||
|
||||
if (!strcasecmp(a, b))
|
||||
return 0;
|
||||
|
@ -865,9 +865,9 @@ pkgconf_compare_version(const char *a, const char *b)
|
|||
if (*one == '~' || *two == '~')
|
||||
{
|
||||
if (*one != '~')
|
||||
return -1;
|
||||
if (*two != '~')
|
||||
return 1;
|
||||
if (*two != '~')
|
||||
return -1;
|
||||
|
||||
one++;
|
||||
two++;
|
||||
|
|
Loading…
Reference in New Issue