src/utils.c

changeset 309
4355c6039a28
parent 308
d6f580621512
child 310
b09677d72413
equal deleted inserted replaced
308:d6f580621512 309:4355c6039a28
90 90
91 int ucx_cmp_str(const void *s1, const void *s2, void *data) { 91 int ucx_cmp_str(const void *s1, const void *s2, void *data) {
92 return strcmp((const char*)s1, (const char*)s2); 92 return strcmp((const char*)s1, (const char*)s2);
93 } 93 }
94 94
95 int ucx_strncmp(const void *s1, const void *s2, void *n) { 95 int ucx_cmp_strn(const void *s1, const void *s2, void *n) {
96 return strncmp((const char*)s1, (const char*)s2, *((size_t*) n)); 96 return strncmp((const char*)s1, (const char*)s2, *((size_t*) n));
97 } 97 }
98 98
99 int ucx_sstrcmp(const void *s1, const void *s2, void *data) { 99 int ucx_sstrcmp(const void *s1, const void *s2, void *data) {
100 sstr_t a = *(const sstr_t*) s1; 100 sstr_t a = *(const sstr_t*) s1;

mercurial