35 #if MICROPY_PY_BUILTINS_FLOAT 39 #if MICROPY_LONGINT_IMPL == MICROPY_LONGINT_IMPL_LONGLONG 41 #if MICROPY_PY_SYS_MAXSIZE 53 mp_longint_impl_t value = 0;
54 for (; len--; buf += delta) {
55 value = (value << 8) | *buf;
63 long long val =
self->
val;
71 for (; len > 0; --len) {
79 mp_longint_impl_t val;
80 if (MP_OBJ_IS_SMALL_INT(self_in)) {
109 if (self->val >= 0) {
114 self->val = -
self->val;
125 if (MP_OBJ_IS_SMALL_INT(lhs_in)) {
133 if (MP_OBJ_IS_SMALL_INT(rhs_in)) {
179 #if MICROPY_PY_BUILTINS_FLOAT 180 return mp_obj_float_binary_op(op, lhs_val, rhs_in);
186 while (rhs_val > 0) {
200 return mp_obj_new_bool(lhs_val < rhs_val);
202 return mp_obj_new_bool(lhs_val > rhs_val);
204 return mp_obj_new_bool(lhs_val <= rhs_val);
206 return mp_obj_new_bool(lhs_val >= rhs_val);
208 return mp_obj_new_bool(lhs_val == rhs_val);
240 if (val >> (
sizeof(
unsigned long long) * 8 - 1) != 0) {
255 o->
val = strtoll(*str, &endptr, base);
261 if (MP_OBJ_IS_SMALL_INT(self_in)) {
274 #if MICROPY_PY_BUILTINS_FLOAT 275 mp_float_t mp_obj_int_as_float_impl(
mp_obj_t self_in) {
NORETURN void mp_raise_msg(const mp_obj_type_t *exc_type, const char *msg)
#define MP_OBJ_IS_TYPE(o, t)
mp_obj_t mp_obj_new_int_from_ll(long long val)
mp_obj_t mp_obj_int_binary_op_extra_cases(mp_binary_op_t op, mp_obj_t lhs_in, mp_obj_t rhs_in)
int mp_obj_int_sign(mp_obj_t self_in)
#define MP_OBJ_FROM_PTR(p)
mp_int_t mp_obj_int_get_truncated(mp_const_obj_t self_in)
mp_obj_t mp_obj_int_binary_op(mp_binary_op_t op, mp_obj_t lhs_in, mp_obj_t rhs_in)
mp_obj_t mp_obj_new_int_from_str_len(const char **str, size_t len, bool neg, unsigned int base)
mp_obj_t mp_obj_new_int(mp_int_t value)
#define MP_OBJ_SMALL_INT_VALUE(o)
void mp_obj_int_to_bytes_impl(mp_obj_t self_in, bool big_endian, size_t len, byte *buf)
#define MP_OBJ_NEW_SMALL_INT(small_int)
#define MP_SMALL_INT_FITS(n)
mp_obj_t mp_obj_new_int_from_ull(unsigned long long val)
mp_obj_t mp_obj_int_from_bytes_impl(bool big_endian, size_t len, const byte *buf)
NORETURN void mp_raise_ValueError(const char *msg)
mp_obj_t mp_obj_new_int_from_uint(mp_uint_t value)
const mp_obj_int_t mp_maxsize_obj
const mp_obj_type_t mp_type_int
mp_obj_t mp_obj_int_unary_op(mp_unary_op_t op, mp_obj_t o_in)
mp_int_t mp_obj_int_get_checked(mp_const_obj_t self_in)
#define MP_SMALL_INT_POSITIVE_MASK
const mp_obj_type_t mp_type_OverflowError