Numworks Epsilon  1.4.1
Graphing Calculator Operating System
modbuiltins.c File Reference
#include <stdio.h>
#include <assert.h>
#include "py/smallint.h"
#include "py/objint.h"
#include "py/objstr.h"
#include "py/objtype.h"
#include "py/runtime.h"
#include "py/builtin.h"
#include "py/stream.h"

Go to the source code of this file.

Functions

STATIC mp_obj_t mp_builtin___build_class__ (size_t n_args, const mp_obj_t *args)
 
 MP_DEFINE_CONST_FUN_OBJ_VAR (mp_builtin___build_class___obj, 2, mp_builtin___build_class__)
 
STATIC mp_obj_t mp_builtin_abs (mp_obj_t o_in)
 
 MP_DEFINE_CONST_FUN_OBJ_1 (mp_builtin_abs_obj, mp_builtin_abs)
 
STATIC mp_obj_t mp_builtin_all (mp_obj_t o_in)
 
 MP_DEFINE_CONST_FUN_OBJ_1 (mp_builtin_all_obj, mp_builtin_all)
 
STATIC mp_obj_t mp_builtin_any (mp_obj_t o_in)
 
 MP_DEFINE_CONST_FUN_OBJ_1 (mp_builtin_any_obj, mp_builtin_any)
 
STATIC mp_obj_t mp_builtin_bin (mp_obj_t o_in)
 
 MP_DEFINE_CONST_FUN_OBJ_1 (mp_builtin_bin_obj, mp_builtin_bin)
 
STATIC mp_obj_t mp_builtin_callable (mp_obj_t o_in)
 
 MP_DEFINE_CONST_FUN_OBJ_1 (mp_builtin_callable_obj, mp_builtin_callable)
 
STATIC mp_obj_t mp_builtin_chr (mp_obj_t o_in)
 
 MP_DEFINE_CONST_FUN_OBJ_1 (mp_builtin_chr_obj, mp_builtin_chr)
 
STATIC mp_obj_t mp_builtin_dir (size_t n_args, const mp_obj_t *args)
 
 MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN (mp_builtin_dir_obj, 0, 1, mp_builtin_dir)
 
STATIC mp_obj_t mp_builtin_divmod (mp_obj_t o1_in, mp_obj_t o2_in)
 
 MP_DEFINE_CONST_FUN_OBJ_2 (mp_builtin_divmod_obj, mp_builtin_divmod)
 
STATIC mp_obj_t mp_builtin_hash (mp_obj_t o_in)
 
 MP_DEFINE_CONST_FUN_OBJ_1 (mp_builtin_hash_obj, mp_builtin_hash)
 
STATIC mp_obj_t mp_builtin_hex (mp_obj_t o_in)
 
 MP_DEFINE_CONST_FUN_OBJ_1 (mp_builtin_hex_obj, mp_builtin_hex)
 
STATIC mp_obj_t mp_builtin_iter (mp_obj_t o_in)
 
 MP_DEFINE_CONST_FUN_OBJ_1 (mp_builtin_iter_obj, mp_builtin_iter)
 
STATIC mp_obj_t mp_builtin_next (mp_obj_t o)
 
 MP_DEFINE_CONST_FUN_OBJ_1 (mp_builtin_next_obj, mp_builtin_next)
 
STATIC mp_obj_t mp_builtin_oct (mp_obj_t o_in)
 
 MP_DEFINE_CONST_FUN_OBJ_1 (mp_builtin_oct_obj, mp_builtin_oct)
 
STATIC mp_obj_t mp_builtin_ord (mp_obj_t o_in)
 
 MP_DEFINE_CONST_FUN_OBJ_1 (mp_builtin_ord_obj, mp_builtin_ord)
 
STATIC mp_obj_t mp_builtin_pow (size_t n_args, const mp_obj_t *args)
 
 MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN (mp_builtin_pow_obj, 2, 3, mp_builtin_pow)
 
STATIC mp_obj_t mp_builtin_print (size_t n_args, const mp_obj_t *args, mp_map_t *kwargs)
 
 MP_DEFINE_CONST_FUN_OBJ_KW (mp_builtin_print_obj, 0, mp_builtin_print)
 
STATIC mp_obj_t mp_builtin___repl_print__ (mp_obj_t o)
 
 MP_DEFINE_CONST_FUN_OBJ_1 (mp_builtin___repl_print___obj, mp_builtin___repl_print__)
 
STATIC mp_obj_t mp_builtin_repr (mp_obj_t o_in)
 
 MP_DEFINE_CONST_FUN_OBJ_1 (mp_builtin_repr_obj, mp_builtin_repr)
 
STATIC mp_obj_t mp_builtin_round (size_t n_args, const mp_obj_t *args)
 
 MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN (mp_builtin_round_obj, 1, 2, mp_builtin_round)
 
STATIC mp_obj_t mp_builtin_sum (size_t n_args, const mp_obj_t *args)
 
 MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN (mp_builtin_sum_obj, 1, 2, mp_builtin_sum)
 
STATIC mp_obj_t mp_builtin_sorted (size_t n_args, const mp_obj_t *args, mp_map_t *kwargs)
 
 MP_DEFINE_CONST_FUN_OBJ_KW (mp_builtin_sorted_obj, 1, mp_builtin_sorted)
 
STATIC mp_obj_t mp_builtin_getattr (size_t n_args, const mp_obj_t *args)
 
 MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN (mp_builtin_getattr_obj, 2, 3, mp_builtin_getattr)
 
STATIC mp_obj_t mp_builtin_setattr (mp_obj_t base, mp_obj_t attr, mp_obj_t value)
 
 MP_DEFINE_CONST_FUN_OBJ_3 (mp_builtin_setattr_obj, mp_builtin_setattr)
 
STATIC mp_obj_t mp_builtin_hasattr (mp_obj_t object_in, mp_obj_t attr_in)
 
 MP_DEFINE_CONST_FUN_OBJ_2 (mp_builtin_hasattr_obj, mp_builtin_hasattr)
 
STATIC mp_obj_t mp_builtin_globals (void)
 
 MP_DEFINE_CONST_FUN_OBJ_0 (mp_builtin_globals_obj, mp_builtin_globals)
 
STATIC mp_obj_t mp_builtin_locals (void)
 
 MP_DEFINE_CONST_FUN_OBJ_0 (mp_builtin_locals_obj, mp_builtin_locals)
 
 MP_DEFINE_CONST_FUN_OBJ_1 (mp_builtin_id_obj, mp_obj_id)
 
 MP_DEFINE_CONST_FUN_OBJ_1 (mp_builtin_len_obj, mp_obj_len)
 
 MP_DEFINE_CONST_DICT (mp_module_builtins_globals, mp_module_builtins_globals_table)
 

Variables

STATIC const mp_rom_map_elem_t mp_module_builtins_globals_table []
 
const mp_obj_module_t mp_module_builtins
 

Function Documentation

◆ mp_builtin___build_class__()

STATIC mp_obj_t mp_builtin___build_class__ ( size_t  n_args,
const mp_obj_t args 
)

Definition at line 49 of file modbuiltins.c.

◆ mp_builtin___repl_print__()

STATIC mp_obj_t mp_builtin___repl_print__ ( mp_obj_t  o)

Definition at line 431 of file modbuiltins.c.

◆ mp_builtin_abs()

STATIC mp_obj_t mp_builtin_abs ( mp_obj_t  o_in)

Definition at line 91 of file modbuiltins.c.

◆ mp_builtin_all()

STATIC mp_obj_t mp_builtin_all ( mp_obj_t  o_in)

Definition at line 96 of file modbuiltins.c.

◆ mp_builtin_any()

STATIC mp_obj_t mp_builtin_any ( mp_obj_t  o_in)

Definition at line 109 of file modbuiltins.c.

◆ mp_builtin_bin()

STATIC mp_obj_t mp_builtin_bin ( mp_obj_t  o_in)

Definition at line 122 of file modbuiltins.c.

◆ mp_builtin_callable()

STATIC mp_obj_t mp_builtin_callable ( mp_obj_t  o_in)

Definition at line 128 of file modbuiltins.c.

◆ mp_builtin_chr()

STATIC mp_obj_t mp_builtin_chr ( mp_obj_t  o_in)

Definition at line 137 of file modbuiltins.c.

◆ mp_builtin_dir()

STATIC mp_obj_t mp_builtin_dir ( size_t  n_args,
const mp_obj_t args 
)

Definition at line 175 of file modbuiltins.c.

◆ mp_builtin_divmod()

STATIC mp_obj_t mp_builtin_divmod ( mp_obj_t  o1_in,
mp_obj_t  o2_in 
)

Definition at line 223 of file modbuiltins.c.

◆ mp_builtin_getattr()

STATIC mp_obj_t mp_builtin_getattr ( size_t  n_args,
const mp_obj_t args 
)

Definition at line 522 of file modbuiltins.c.

◆ mp_builtin_globals()

STATIC mp_obj_t mp_builtin_globals ( void  )

Definition at line 558 of file modbuiltins.c.

◆ mp_builtin_hasattr()

STATIC mp_obj_t mp_builtin_hasattr ( mp_obj_t  object_in,
mp_obj_t  attr_in 
)

Definition at line 544 of file modbuiltins.c.

◆ mp_builtin_hash()

STATIC mp_obj_t mp_builtin_hash ( mp_obj_t  o_in)

Definition at line 228 of file modbuiltins.c.

◆ mp_builtin_hex()

STATIC mp_obj_t mp_builtin_hex ( mp_obj_t  o_in)

Definition at line 234 of file modbuiltins.c.

◆ mp_builtin_iter()

STATIC mp_obj_t mp_builtin_iter ( mp_obj_t  o_in)

Definition at line 268 of file modbuiltins.c.

◆ mp_builtin_locals()

STATIC mp_obj_t mp_builtin_locals ( void  )

Definition at line 563 of file modbuiltins.c.

◆ mp_builtin_next()

STATIC mp_obj_t mp_builtin_next ( mp_obj_t  o)

Definition at line 329 of file modbuiltins.c.

◆ mp_builtin_oct()

STATIC mp_obj_t mp_builtin_oct ( mp_obj_t  o_in)

Definition at line 339 of file modbuiltins.c.

◆ mp_builtin_ord()

STATIC mp_obj_t mp_builtin_ord ( mp_obj_t  o_in)

Definition at line 344 of file modbuiltins.c.

◆ mp_builtin_pow()

STATIC mp_obj_t mp_builtin_pow ( size_t  n_args,
const mp_obj_t args 
)

Definition at line 371 of file modbuiltins.c.

◆ mp_builtin_print()

STATIC mp_obj_t mp_builtin_print ( size_t  n_args,
const mp_obj_t args,
mp_map_t kwargs 
)

Definition at line 386 of file modbuiltins.c.

◆ mp_builtin_repr()

STATIC mp_obj_t mp_builtin_repr ( mp_obj_t  o_in)

Definition at line 445 of file modbuiltins.c.

◆ mp_builtin_round()

STATIC mp_obj_t mp_builtin_round ( size_t  n_args,
const mp_obj_t args 
)

Definition at line 454 of file modbuiltins.c.

◆ mp_builtin_setattr()

STATIC mp_obj_t mp_builtin_setattr ( mp_obj_t  base,
mp_obj_t  attr,
mp_obj_t  value 
)

Definition at line 531 of file modbuiltins.c.

◆ mp_builtin_sorted()

STATIC mp_obj_t mp_builtin_sorted ( size_t  n_args,
const mp_obj_t args,
mp_map_t kwargs 
)

Definition at line 495 of file modbuiltins.c.

◆ mp_builtin_sum()

STATIC mp_obj_t mp_builtin_sum ( size_t  n_args,
const mp_obj_t args 
)

Definition at line 479 of file modbuiltins.c.

◆ MP_DEFINE_CONST_DICT()

◆ MP_DEFINE_CONST_FUN_OBJ_0() [1/2]

MP_DEFINE_CONST_FUN_OBJ_0 ( mp_builtin_globals_obj  ,
mp_builtin_globals   
)

◆ MP_DEFINE_CONST_FUN_OBJ_0() [2/2]

MP_DEFINE_CONST_FUN_OBJ_0 ( mp_builtin_locals_obj  ,
mp_builtin_locals   
)

◆ MP_DEFINE_CONST_FUN_OBJ_1() [1/16]

MP_DEFINE_CONST_FUN_OBJ_1 ( mp_builtin_abs_obj  ,
mp_builtin_abs   
)

◆ MP_DEFINE_CONST_FUN_OBJ_1() [2/16]

MP_DEFINE_CONST_FUN_OBJ_1 ( mp_builtin_all_obj  ,
mp_builtin_all   
)

◆ MP_DEFINE_CONST_FUN_OBJ_1() [3/16]

MP_DEFINE_CONST_FUN_OBJ_1 ( mp_builtin_any_obj  ,
mp_builtin_any   
)

◆ MP_DEFINE_CONST_FUN_OBJ_1() [4/16]

MP_DEFINE_CONST_FUN_OBJ_1 ( mp_builtin_bin_obj  ,
mp_builtin_bin   
)

◆ MP_DEFINE_CONST_FUN_OBJ_1() [5/16]

MP_DEFINE_CONST_FUN_OBJ_1 ( mp_builtin_callable_obj  ,
mp_builtin_callable   
)

◆ MP_DEFINE_CONST_FUN_OBJ_1() [6/16]

MP_DEFINE_CONST_FUN_OBJ_1 ( mp_builtin_chr_obj  ,
mp_builtin_chr   
)

◆ MP_DEFINE_CONST_FUN_OBJ_1() [7/16]

MP_DEFINE_CONST_FUN_OBJ_1 ( mp_builtin_hash_obj  ,
mp_builtin_hash   
)

◆ MP_DEFINE_CONST_FUN_OBJ_1() [8/16]

MP_DEFINE_CONST_FUN_OBJ_1 ( mp_builtin_hex_obj  ,
mp_builtin_hex   
)

◆ MP_DEFINE_CONST_FUN_OBJ_1() [9/16]

MP_DEFINE_CONST_FUN_OBJ_1 ( mp_builtin_iter_obj  ,
mp_builtin_iter   
)

◆ MP_DEFINE_CONST_FUN_OBJ_1() [10/16]

MP_DEFINE_CONST_FUN_OBJ_1 ( mp_builtin_next_obj  ,
mp_builtin_next   
)

◆ MP_DEFINE_CONST_FUN_OBJ_1() [11/16]

MP_DEFINE_CONST_FUN_OBJ_1 ( mp_builtin_oct_obj  ,
mp_builtin_oct   
)

◆ MP_DEFINE_CONST_FUN_OBJ_1() [12/16]

MP_DEFINE_CONST_FUN_OBJ_1 ( mp_builtin_ord_obj  ,
mp_builtin_ord   
)

◆ MP_DEFINE_CONST_FUN_OBJ_1() [13/16]

MP_DEFINE_CONST_FUN_OBJ_1 ( mp_builtin___repl_print___obj  ,
mp_builtin___repl_print__   
)

◆ MP_DEFINE_CONST_FUN_OBJ_1() [14/16]

MP_DEFINE_CONST_FUN_OBJ_1 ( mp_builtin_repr_obj  ,
mp_builtin_repr   
)

◆ MP_DEFINE_CONST_FUN_OBJ_1() [15/16]

MP_DEFINE_CONST_FUN_OBJ_1 ( mp_builtin_id_obj  ,
mp_obj_id   
)

◆ MP_DEFINE_CONST_FUN_OBJ_1() [16/16]

MP_DEFINE_CONST_FUN_OBJ_1 ( mp_builtin_len_obj  ,
mp_obj_len   
)

◆ MP_DEFINE_CONST_FUN_OBJ_2() [1/2]

MP_DEFINE_CONST_FUN_OBJ_2 ( mp_builtin_divmod_obj  ,
mp_builtin_divmod   
)

◆ MP_DEFINE_CONST_FUN_OBJ_2() [2/2]

MP_DEFINE_CONST_FUN_OBJ_2 ( mp_builtin_hasattr_obj  ,
mp_builtin_hasattr   
)

◆ MP_DEFINE_CONST_FUN_OBJ_3()

MP_DEFINE_CONST_FUN_OBJ_3 ( mp_builtin_setattr_obj  ,
mp_builtin_setattr   
)

◆ MP_DEFINE_CONST_FUN_OBJ_KW() [1/2]

MP_DEFINE_CONST_FUN_OBJ_KW ( mp_builtin_print_obj  ,
,
mp_builtin_print   
)

◆ MP_DEFINE_CONST_FUN_OBJ_KW() [2/2]

MP_DEFINE_CONST_FUN_OBJ_KW ( mp_builtin_sorted_obj  ,
,
mp_builtin_sorted   
)

◆ MP_DEFINE_CONST_FUN_OBJ_VAR()

MP_DEFINE_CONST_FUN_OBJ_VAR ( mp_builtin___build_class___obj  ,
,
mp_builtin___build_class__   
)

◆ MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN() [1/5]

MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN ( mp_builtin_dir_obj  ,
,
,
mp_builtin_dir   
)

◆ MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN() [2/5]

MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN ( mp_builtin_pow_obj  ,
,
,
mp_builtin_pow   
)

◆ MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN() [3/5]

MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN ( mp_builtin_round_obj  ,
,
,
mp_builtin_round   
)

◆ MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN() [4/5]

MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN ( mp_builtin_sum_obj  ,
,
,
mp_builtin_sum   
)

◆ MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN() [5/5]

MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN ( mp_builtin_getattr_obj  ,
,
,
mp_builtin_getattr   
)

Variable Documentation

◆ mp_module_builtins

const mp_obj_module_t mp_module_builtins
Initial value:
= {
.base = { &mp_type_module },
}
const mp_obj_dict_t mp_module_builtins_globals
const mp_obj_type_t mp_type_module
Definition: objmodule.c:94

Definition at line 735 of file modbuiltins.c.

◆ mp_module_builtins_globals_table

STATIC const mp_rom_map_elem_t mp_module_builtins_globals_table[]

Definition at line 572 of file modbuiltins.c.