missing pic_eqv_p (when PIC_NAN_BOXING disabled)
This commit is contained in:
parent
9fba9bed2b
commit
8a0b8da884
20
src/value.c
20
src/value.c
|
@ -249,4 +249,24 @@ pic_eq_p(pic_value x, pic_value y)
|
|||
}
|
||||
}
|
||||
|
||||
bool
|
||||
pic_eqv_p(pic_value x, pic_value y)
|
||||
{
|
||||
if (pic_type(x) != pic_type(y))
|
||||
return false;
|
||||
|
||||
switch (pic_type(x)) {
|
||||
case PIC_TT_NIL:
|
||||
return true;
|
||||
case PIC_TT_SYMBOL:
|
||||
return pic_sym(x) == pic_sym(y);
|
||||
case PIC_TT_FLOAT:
|
||||
return pic_float(x) == pic_float(y);
|
||||
case PIC_TT_INT:
|
||||
return pic_int(x) == pic_int(y);
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue