int32_t IntNum_compare_to(IntNum *self, Obj *other) { if (!Obj_Is_A(other, INTNUM)) { return -Obj_Compare_To(other, (Obj*)self); } int64_t self_value = IntNum_To_I64(self); int64_t other_value = Obj_To_I64(other); if (self_value < other_value) { return -1; } else if (self_value > other_value) { return 1; } return 0; }
CharBuf* IntNum_to_string(IntNum *self) { return CB_newf("%i64", IntNum_To_I64(self)); }
String* IntNum_To_String_IMP(IntNum *self) { return Str_newf("%i64", IntNum_To_I64(self)); }