style fix
This commit is contained in:
parent
49a4808a22
commit
2fb97d16ed
24
src/bool.c
24
src/bool.c
|
@ -23,29 +23,29 @@ pic_equal_p(pic_state *pic, pic_value x, pic_value y)
|
||||||
return false;
|
return false;
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case PIC_TT_PAIR:
|
case PIC_TT_PAIR:
|
||||||
return pic_equal_p(pic, pic_car(pic, x), pic_car(pic, y))
|
return pic_equal_p(pic, pic_car(pic, x), pic_car(pic, y)) && pic_equal_p(pic, pic_cdr(pic, x), pic_cdr(pic, y));
|
||||||
&& pic_equal_p(pic, pic_cdr(pic, x), pic_cdr(pic, y));
|
|
||||||
case PIC_TT_BLOB: {
|
case PIC_TT_BLOB: {
|
||||||
int i;
|
int i;
|
||||||
struct pic_blob *v1 = pic_blob_ptr(x), *v2 = pic_blob_ptr(y);
|
struct pic_blob *u = pic_blob_ptr(x), *v = pic_blob_ptr(y);
|
||||||
if(v1->len != v2->len){
|
|
||||||
|
if(u->len != v->len){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
for(i = 0; i < v1->len; ++i){
|
for(i = 0; i < u->len; ++i){
|
||||||
if(v1->data[i] != v2->data[i])
|
if(u->data[i] != v->data[i])
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
case PIC_TT_VECTOR:{
|
case PIC_TT_VECTOR: {
|
||||||
size_t i;
|
size_t i;
|
||||||
struct pic_vector *v1 = pic_vec_ptr(x), *v2 = pic_vec_ptr(y);
|
struct pic_vector *u = pic_vec_ptr(x), *v = pic_vec_ptr(y);
|
||||||
|
|
||||||
if(v1->len != v2->len){
|
if(u->len != v->len){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
for(i = 0; i < v1->len; ++i){
|
for(i = 0; i < u->len; ++i){
|
||||||
if(! pic_equal_p(pic, v1->data[i], v2->data[i]))
|
if(! pic_equal_p(pic, u->data[i], v->data[i]))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue