missing pic_eqv_p (when PIC_NAN_BOXING disabled)

This commit is contained in:
Yuichi Nishiwaki 2013-11-06 18:54:46 +09:00
parent 9fba9bed2b
commit 8a0b8da884
1 changed files with 20 additions and 0 deletions

View File

@ -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