Merge branch '#3-issue' into #3-issue-descrete-tests

This commit is contained in:
Gregory Lirent 2022-06-10 21:23:26 +03:00
commit 10a22d2f26
3 changed files with 4 additions and 5 deletions

View File

@ -112,7 +112,6 @@ void list_extend(list_t* x, const list_t* s) {
size_t list_slice(list_t* x, list_t* s, ssize_t i, size_t n, _Bool cut) {
ldir_t dir;
lnode_t* c;
lnode_t* e;
size_t r;

View File

@ -59,7 +59,7 @@ int libcdsb_map_find(map_t* x, const void* k, vtype t, void* _, map_access_callb
while (!mnode_is_empty(c)) {
key = vnode_peek(&c->key, x->type);
cmp = vtype_compare(key, x->type, k, t);
cmp = vtype_compare(k, t, key, x->type);
if (cmp == 0) {
cmp = (callback) ? callback(key, x->type, vnode_peek(&c->value, c->type), c->type, _) : 0;
@ -72,7 +72,7 @@ int libcdsb_map_find(map_t* x, const void* k, vtype t, void* _, map_access_callb
}
return cmp;
}
} else c = (cmp < 0) ? c->left : c->right;
}
return -1;

View File

@ -51,7 +51,7 @@ int libcdsb_vset_find(vtype_set* x, const void* v, vtype t, void* _, vset_access
while (!rbnode_is_empty(c)) {
val = vnode_peek(&c->value, x->type);
cmp = vtype_compare(val, x->type, v, t);
cmp = vtype_compare(v, t, val, x->type);
if (cmp == 0) {
cmp = (callback) ? callback(val, x->type, _) : 0;
@ -63,7 +63,7 @@ int libcdsb_vset_find(vtype_set* x, const void* v, vtype t, void* _, vset_access
}
return cmp;
}
} else c = (cmp < 0) ? c->left : c->right;
}
return -1;