mirror of
https://github.com/janet-lang/janet
synced 2025-11-13 13:57:19 +00:00
First commit removing the integer number type. This should
remove some complexity and unexpected behavior around numbers in general as all numbers are the same number type, IEEE 754 double precision numbers. Also update examples and tests, some of which were out of date. Some more testing may be needed for new changes to numbers.
This commit is contained in:
@@ -357,11 +357,9 @@ static int janet_gc_idequals(Janet lhs, Janet rhs) {
|
||||
case JANET_TRUE:
|
||||
case JANET_FALSE:
|
||||
case JANET_NIL:
|
||||
case JANET_NUMBER:
|
||||
/* These values don't really matter to the gc so returning 1 al the time is fine. */
|
||||
return 1;
|
||||
case JANET_INTEGER:
|
||||
return janet_unwrap_integer(lhs) == janet_unwrap_integer(rhs);
|
||||
case JANET_REAL:
|
||||
return janet_unwrap_real(lhs) == janet_unwrap_real(rhs);
|
||||
default:
|
||||
return janet_unwrap_pointer(lhs) == janet_unwrap_pointer(rhs);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user