]>
Witch of Git - ivy/blob - rt/src/int.rs
1 use crate::{Obj
, ObjTag
};
2 use std
::sync
::atomic
::AtomicU32
;
13 pub unsafe extern "C" fn ivy_check_int(obj
: Obj
) {
14 if obj
.tag() != Some(ObjTag
::Int
) {
16 "ivy_check_int called with non-integer object {:016x}.",
22 // This should probably be a macro rather than a call?
23 // But it might be good to have it for completeness.
24 // Or maybe it's valuable if we want to support big integers.
26 pub unsafe extern "C" fn ivy_make_int(value
: i64) -> Obj
{
27 // @TODO: Handle 64 bit values rather than 63 bit integers