#include <stdlib.h>
#include <assert.h>
#include <string.h>
#include "py/parsenum.h"
#include "py/smallint.h"
#include "py/objint.h"
#include "py/objstr.h"
#include "py/runtime.h"
#include "py/binary.h"
Go to the source code of this file.
|
STATIC mp_obj_t | mp_obj_int_make_new (const mp_obj_type_t *type_in, size_t n_args, size_t n_kw, const mp_obj_t *args) |
|
void | mp_obj_int_print (const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) |
|
size_t | mp_int_format_size (size_t num_bits, int base, const char *prefix, char comma) |
|
char * | mp_obj_int_formatted (char **buf, size_t *buf_size, size_t *fmt_size, mp_const_obj_t self_in, int base, const char *prefix, char base_char, char comma) |
|
int | mp_obj_int_sign (mp_obj_t self_in) |
|
mp_obj_t | mp_obj_int_unary_op (mp_unary_op_t op, mp_obj_t o_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_from_ll (long long val) |
|
mp_obj_t | mp_obj_new_int_from_ull (unsigned long long val) |
|
mp_obj_t | mp_obj_new_int_from_uint (mp_uint_t value) |
|
mp_obj_t | mp_obj_new_int (mp_int_t value) |
|
mp_int_t | mp_obj_int_get_truncated (mp_const_obj_t self_in) |
|
mp_int_t | mp_obj_int_get_checked (mp_const_obj_t self_in) |
|
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) |
|
STATIC mp_obj_t | int_from_bytes (size_t n_args, const mp_obj_t *args) |
|
STATIC | MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN (int_from_bytes_fun_obj, 3, 4, int_from_bytes) |
|
STATIC | MP_DEFINE_CONST_CLASSMETHOD_OBJ (int_from_bytes_obj, MP_ROM_PTR(&int_from_bytes_fun_obj)) |
|
STATIC mp_obj_t | int_to_bytes (size_t n_args, const mp_obj_t *args) |
|
STATIC | MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN (int_to_bytes_obj, 3, 4, int_to_bytes) |
|
STATIC | MP_DEFINE_CONST_DICT (int_locals_dict, int_locals_dict_table) |
|
◆ fmt_int_t
◆ fmt_uint_t
◆ int_from_bytes()
◆ int_to_bytes()
◆ MP_DEFINE_CONST_CLASSMETHOD_OBJ()
STATIC MP_DEFINE_CONST_CLASSMETHOD_OBJ |
( |
int_from_bytes_obj |
, |
|
|
MP_ROM_PTR & |
int_from_bytes_fun_obj |
|
) |
| |
◆ MP_DEFINE_CONST_DICT()
◆ MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN() [1/2]
◆ MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN() [2/2]
◆ mp_int_format_size()
size_t mp_int_format_size |
( |
size_t |
num_bits, |
|
|
int |
base, |
|
|
const char * |
prefix, |
|
|
char |
comma |
|
) |
| |
◆ mp_obj_int_binary_op()
◆ mp_obj_int_binary_op_extra_cases()
◆ mp_obj_int_formatted()
char* mp_obj_int_formatted |
( |
char ** |
buf, |
|
|
size_t * |
buf_size, |
|
|
size_t * |
fmt_size, |
|
|
mp_const_obj_t |
self_in, |
|
|
int |
base, |
|
|
const char * |
prefix, |
|
|
char |
base_char, |
|
|
char |
comma |
|
) |
| |
◆ mp_obj_int_get_checked()
◆ mp_obj_int_get_truncated()
◆ mp_obj_int_make_new()
◆ mp_obj_int_print()
◆ mp_obj_int_sign()
◆ mp_obj_int_unary_op()
◆ mp_obj_new_int()
◆ mp_obj_new_int_from_ll()
mp_obj_t mp_obj_new_int_from_ll |
( |
long long |
val | ) |
|
◆ mp_obj_new_int_from_str_len()
mp_obj_t mp_obj_new_int_from_str_len |
( |
const char ** |
str, |
|
|
size_t |
len, |
|
|
bool |
neg, |
|
|
unsigned int |
base |
|
) |
| |
◆ mp_obj_new_int_from_uint()
◆ mp_obj_new_int_from_ull()
mp_obj_t mp_obj_new_int_from_ull |
( |
unsigned long long |
val | ) |
|
◆ int_locals_dict_table
Initial value:
Definition at line 452 of file objint.c.
◆ log_base2_floor
Initial value:= {
0, 1, 1, 2,
2, 2, 2, 3,
3, 3, 3, 3,
3, 3, 3, 4,
}
Definition at line 194 of file objint.c.
◆ mp_type_int
Initial value:= {
}
mp_obj_t mp_obj_int_binary_op(mp_binary_op_t op, mp_obj_t lhs_in, mp_obj_t rhs_in)
STATIC mp_obj_t mp_obj_int_make_new(const mp_obj_type_t *type_in, size_t n_args, size_t n_kw, const mp_obj_t *args)
mp_obj_t mp_obj_int_unary_op(mp_unary_op_t op, mp_obj_t o_in)
const mp_obj_type_t mp_type_type
void mp_obj_int_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind)
Definition at line 459 of file objint.c.