mirror of
https://github.com/janet-lang/janet
synced 2025-02-05 03:30:02 +00:00
Fix wrong check on big endian systems
We can't randomly type pun random-sized types on big endian systems.
This commit is contained in:
parent
1e28876494
commit
5d840b944b
@ -663,7 +663,7 @@ struct Janet {
|
|||||||
#define janet_type(x) ((x).type)
|
#define janet_type(x) ((x).type)
|
||||||
#define janet_checktype(x, t) ((x).type == (t))
|
#define janet_checktype(x, t) ((x).type == (t))
|
||||||
#define janet_truthy(x) \
|
#define janet_truthy(x) \
|
||||||
((x).type != JANET_NIL && ((x).type != JANET_BOOLEAN || ((x).as.integer & 0x1)))
|
((x).type != JANET_NIL && ((x).type != JANET_BOOLEAN || ((x).as.u64 & 0x1)))
|
||||||
|
|
||||||
#define janet_unwrap_struct(x) ((const JanetKV *)(x).as.pointer)
|
#define janet_unwrap_struct(x) ((const JanetKV *)(x).as.pointer)
|
||||||
#define janet_unwrap_tuple(x) ((const Janet *)(x).as.pointer)
|
#define janet_unwrap_tuple(x) ((const Janet *)(x).as.pointer)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user