1
0
mirror of https://github.com/janet-lang/janet synced 2025-10-31 07:33:01 +00:00

Replace cast with type pun.

This commit is contained in:
Calvin Rose
2018-11-18 14:17:50 -05:00
parent 69b6894f6b
commit 4c4eff9390
5 changed files with 43 additions and 2 deletions

View File

@@ -36,7 +36,8 @@ void *janet_nanbox_to_pointer(Janet x) {
#else
x.i64 = (x.i64 << 16) >> 16;
#endif
return (void *)x.i64;
return x.pointer;
}
Janet janet_nanbox_from_pointer(void *p, uint64_t tagmask) {