renames ucx_sstrcmp() to ucx_cmp_sstr()

Mon, 14 May 2018 18:16:12 +0200

author
Mike Becker <universe@uap-core.de>
date
Mon, 14 May 2018 18:16:12 +0200
changeset 310
b09677d72413
parent 309
4355c6039a28
child 311
e1f3248576bc

renames ucx_sstrcmp() to ucx_cmp_sstr()

docs/src/modules.md file | annotate | diff | comparison | revisions
src/ucx/utils.h file | annotate | diff | comparison | revisions
src/utils.c file | annotate | diff | comparison | revisions
--- a/docs/src/modules.md	Mon May 14 18:13:03 2018 +0200
+++ b/docs/src/modules.md	Mon May 14 18:16:12 2018 +0200
@@ -204,7 +204,7 @@
 UcxList* remove_duplicates(sstr_t* array, size_t arrlen) {
     UcxList* list = NULL;
     for (size_t i = 0 ; i < arrlen ; ++i) {
-        if (ucx_list_find(list, array+i, ucx_sstrcmp, NULL) == -1) {
+        if (ucx_list_find(list, array+i, ucx_cmp_sstr, NULL) == -1) {
             sstr_t* s = malloc(sizeof(sstr_t));
             *s = sstrdup(array[i]);
             list = ucx_list_append(list, s);
--- a/src/ucx/utils.h	Mon May 14 18:13:03 2018 +0200
+++ b/src/ucx/utils.h	Mon May 14 18:16:12 2018 +0200
@@ -162,7 +162,7 @@
  * @param data ignored
  * @return the result of sstrcmp(s1, s2)
  */
-int ucx_sstrcmp(const void *s1, const void *s2, void *data);
+int ucx_cmp_sstr(const void *s1, const void *s2, void *data);
 
 /**
  * Compares two integers of type int.
--- a/src/utils.c	Mon May 14 18:13:03 2018 +0200
+++ b/src/utils.c	Mon May 14 18:16:12 2018 +0200
@@ -96,7 +96,7 @@
     return strncmp((const char*)s1, (const char*)s2, *((size_t*) n));
 }
 
-int ucx_sstrcmp(const void *s1, const void *s2, void *data) {
+int ucx_cmp_sstr(const void *s1, const void *s2, void *data) {
     sstr_t a = *(const sstr_t*) s1;
     sstr_t b = *(const sstr_t*) s2;
     return sstrcmp(a, b);

mercurial