2014-05-03 22:27:38 +00:00
|
|
|
/*
|
|
|
|
* This file is part of the Micro Python project, http://micropython.org/
|
|
|
|
*
|
|
|
|
* The MIT License (MIT)
|
|
|
|
*
|
|
|
|
* Copyright (c) 2013, 2014 Damien P. George
|
|
|
|
*
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
* of this software and associated documentation files (the "Software"), to deal
|
|
|
|
* in the Software without restriction, including without limitation the rights
|
|
|
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
* copies of the Software, and to permit persons to whom the Software is
|
|
|
|
* furnished to do so, subject to the following conditions:
|
|
|
|
*
|
|
|
|
* The above copyright notice and this permission notice shall be included in
|
|
|
|
* all copies or substantial portions of the Software.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
|
* THE SOFTWARE.
|
|
|
|
*/
|
2015-01-01 20:27:54 +00:00
|
|
|
#ifndef __MICROPY_INCLUDED_PY_BUILTIN_H__
|
|
|
|
#define __MICROPY_INCLUDED_PY_BUILTIN_H__
|
|
|
|
|
|
|
|
#include "py/obj.h"
|
2014-05-03 22:27:38 +00:00
|
|
|
|
2016-01-03 14:21:40 +00:00
|
|
|
mp_obj_t mp_builtin___import__(size_t n_args, const mp_obj_t *args);
|
|
|
|
mp_obj_t mp_builtin_open(size_t n_args, const mp_obj_t *args, mp_map_t *kwargs);
|
|
|
|
mp_obj_t mp_micropython_mem_info(size_t n_args, const mp_obj_t *args);
|
2013-12-21 18:17:45 +00:00
|
|
|
|
2016-10-18 00:06:20 +00:00
|
|
|
MP_DECLARE_CONST_FUN_OBJ_VAR(mp_builtin___build_class___obj);
|
|
|
|
MP_DECLARE_CONST_FUN_OBJ_VAR_BETWEEN(mp_builtin___import___obj);
|
|
|
|
MP_DECLARE_CONST_FUN_OBJ_1(mp_builtin___repl_print___obj);
|
|
|
|
MP_DECLARE_CONST_FUN_OBJ_1(mp_builtin_abs_obj);
|
|
|
|
MP_DECLARE_CONST_FUN_OBJ_1(mp_builtin_all_obj);
|
|
|
|
MP_DECLARE_CONST_FUN_OBJ_1(mp_builtin_any_obj);
|
|
|
|
MP_DECLARE_CONST_FUN_OBJ_1(mp_builtin_bin_obj);
|
|
|
|
MP_DECLARE_CONST_FUN_OBJ_1(mp_builtin_callable_obj);
|
|
|
|
MP_DECLARE_CONST_FUN_OBJ_VAR_BETWEEN(mp_builtin_compile_obj);
|
|
|
|
MP_DECLARE_CONST_FUN_OBJ_1(mp_builtin_chr_obj);
|
2016-10-24 02:50:03 +00:00
|
|
|
MP_DECLARE_CONST_FUN_OBJ_2(mp_builtin_delattr_obj);
|
2016-10-18 00:06:20 +00:00
|
|
|
MP_DECLARE_CONST_FUN_OBJ_VAR_BETWEEN(mp_builtin_dir_obj);
|
|
|
|
MP_DECLARE_CONST_FUN_OBJ_2(mp_builtin_divmod_obj);
|
|
|
|
MP_DECLARE_CONST_FUN_OBJ_VAR_BETWEEN(mp_builtin_eval_obj);
|
|
|
|
MP_DECLARE_CONST_FUN_OBJ_VAR_BETWEEN(mp_builtin_exec_obj);
|
|
|
|
MP_DECLARE_CONST_FUN_OBJ_VAR_BETWEEN(mp_builtin_execfile_obj);
|
|
|
|
MP_DECLARE_CONST_FUN_OBJ_VAR_BETWEEN(mp_builtin_getattr_obj);
|
|
|
|
MP_DECLARE_CONST_FUN_OBJ_3(mp_builtin_setattr_obj);
|
|
|
|
MP_DECLARE_CONST_FUN_OBJ_0(mp_builtin_globals_obj);
|
|
|
|
MP_DECLARE_CONST_FUN_OBJ_2(mp_builtin_hasattr_obj);
|
|
|
|
MP_DECLARE_CONST_FUN_OBJ_1(mp_builtin_hash_obj);
|
2017-01-21 12:17:51 +00:00
|
|
|
MP_DECLARE_CONST_FUN_OBJ_VAR_BETWEEN(mp_builtin_help_obj);
|
2016-10-18 00:06:20 +00:00
|
|
|
MP_DECLARE_CONST_FUN_OBJ_1(mp_builtin_hex_obj);
|
|
|
|
MP_DECLARE_CONST_FUN_OBJ_1(mp_builtin_id_obj);
|
|
|
|
MP_DECLARE_CONST_FUN_OBJ_2(mp_builtin_isinstance_obj);
|
|
|
|
MP_DECLARE_CONST_FUN_OBJ_2(mp_builtin_issubclass_obj);
|
|
|
|
MP_DECLARE_CONST_FUN_OBJ_1(mp_builtin_iter_obj);
|
|
|
|
MP_DECLARE_CONST_FUN_OBJ_1(mp_builtin_len_obj);
|
|
|
|
MP_DECLARE_CONST_FUN_OBJ_0(mp_builtin_locals_obj);
|
|
|
|
MP_DECLARE_CONST_FUN_OBJ_KW(mp_builtin_max_obj);
|
|
|
|
MP_DECLARE_CONST_FUN_OBJ_KW(mp_builtin_min_obj);
|
|
|
|
MP_DECLARE_CONST_FUN_OBJ_1(mp_builtin_next_obj);
|
|
|
|
MP_DECLARE_CONST_FUN_OBJ_1(mp_builtin_oct_obj);
|
|
|
|
MP_DECLARE_CONST_FUN_OBJ_1(mp_builtin_ord_obj);
|
|
|
|
MP_DECLARE_CONST_FUN_OBJ_VAR_BETWEEN(mp_builtin_pow_obj);
|
|
|
|
MP_DECLARE_CONST_FUN_OBJ_KW(mp_builtin_print_obj);
|
|
|
|
MP_DECLARE_CONST_FUN_OBJ_1(mp_builtin_repr_obj);
|
|
|
|
MP_DECLARE_CONST_FUN_OBJ_VAR_BETWEEN(mp_builtin_round_obj);
|
|
|
|
MP_DECLARE_CONST_FUN_OBJ_KW(mp_builtin_sorted_obj);
|
|
|
|
MP_DECLARE_CONST_FUN_OBJ_VAR_BETWEEN(mp_builtin_sum_obj);
|
2016-04-14 21:07:56 +00:00
|
|
|
// Defined by a port, but declared here for simplicity
|
2016-10-18 00:06:20 +00:00
|
|
|
MP_DECLARE_CONST_FUN_OBJ_VAR_BETWEEN(mp_builtin_input_obj);
|
|
|
|
MP_DECLARE_CONST_FUN_OBJ_KW(mp_builtin_open_obj);
|
2014-01-19 23:53:15 +00:00
|
|
|
|
2016-10-18 00:06:20 +00:00
|
|
|
MP_DECLARE_CONST_FUN_OBJ_2(mp_namedtuple_obj);
|
2014-02-27 20:22:04 +00:00
|
|
|
|
2016-10-18 00:06:20 +00:00
|
|
|
MP_DECLARE_CONST_FUN_OBJ_2(mp_op_contains_obj);
|
|
|
|
MP_DECLARE_CONST_FUN_OBJ_2(mp_op_getitem_obj);
|
|
|
|
MP_DECLARE_CONST_FUN_OBJ_3(mp_op_setitem_obj);
|
|
|
|
MP_DECLARE_CONST_FUN_OBJ_2(mp_op_delitem_obj);
|
2014-04-13 08:53:15 +00:00
|
|
|
|
2014-04-04 17:08:21 +00:00
|
|
|
extern const mp_obj_module_t mp_module___main__;
|
2014-12-09 16:19:48 +00:00
|
|
|
extern const mp_obj_module_t mp_module_builtins;
|
2014-03-25 14:18:18 +00:00
|
|
|
extern const mp_obj_module_t mp_module_array;
|
|
|
|
extern const mp_obj_module_t mp_module_collections;
|
2014-04-03 11:57:53 +00:00
|
|
|
extern const mp_obj_module_t mp_module_io;
|
2014-03-08 15:24:39 +00:00
|
|
|
extern const mp_obj_module_t mp_module_math;
|
2014-04-17 16:11:03 +00:00
|
|
|
extern const mp_obj_module_t mp_module_cmath;
|
2014-03-08 15:24:39 +00:00
|
|
|
extern const mp_obj_module_t mp_module_micropython;
|
2015-05-04 13:35:40 +00:00
|
|
|
extern const mp_obj_module_t mp_module_ustruct;
|
2014-04-13 03:43:18 +00:00
|
|
|
extern const mp_obj_module_t mp_module_sys;
|
2014-05-05 23:16:43 +00:00
|
|
|
extern const mp_obj_module_t mp_module_gc;
|
2016-04-22 22:52:33 +00:00
|
|
|
extern const mp_obj_module_t mp_module_thread;
|
2014-06-28 00:03:47 +00:00
|
|
|
|
2014-12-09 16:19:48 +00:00
|
|
|
extern const mp_obj_dict_t mp_module_builtins_globals;
|
|
|
|
|
2014-06-28 00:03:47 +00:00
|
|
|
// extmod modules
|
2016-05-10 09:54:25 +00:00
|
|
|
extern const mp_obj_module_t mp_module_uerrno;
|
2014-06-28 00:03:47 +00:00
|
|
|
extern const mp_obj_module_t mp_module_uctypes;
|
2014-10-12 15:16:34 +00:00
|
|
|
extern const mp_obj_module_t mp_module_uzlib;
|
2014-09-17 21:56:34 +00:00
|
|
|
extern const mp_obj_module_t mp_module_ujson;
|
2014-09-12 15:48:07 +00:00
|
|
|
extern const mp_obj_module_t mp_module_ure;
|
2014-10-22 17:37:18 +00:00
|
|
|
extern const mp_obj_module_t mp_module_uheapq;
|
2014-11-21 23:19:13 +00:00
|
|
|
extern const mp_obj_module_t mp_module_uhashlib;
|
2014-11-29 04:19:30 +00:00
|
|
|
extern const mp_obj_module_t mp_module_ubinascii;
|
2016-01-17 10:10:28 +00:00
|
|
|
extern const mp_obj_module_t mp_module_urandom;
|
2016-11-20 20:49:45 +00:00
|
|
|
extern const mp_obj_module_t mp_module_uselect;
|
2015-10-06 15:10:00 +00:00
|
|
|
extern const mp_obj_module_t mp_module_ussl;
|
2016-12-21 21:29:32 +00:00
|
|
|
extern const mp_obj_module_t mp_module_utimeq;
|
2015-05-03 17:25:40 +00:00
|
|
|
extern const mp_obj_module_t mp_module_machine;
|
2015-10-26 21:04:33 +00:00
|
|
|
extern const mp_obj_module_t mp_module_lwip;
|
2016-03-24 17:14:12 +00:00
|
|
|
extern const mp_obj_module_t mp_module_websocket;
|
2016-04-28 21:52:52 +00:00
|
|
|
extern const mp_obj_module_t mp_module_webrepl;
|
2016-04-08 10:08:37 +00:00
|
|
|
extern const mp_obj_module_t mp_module_framebuf;
|
2016-06-14 21:52:45 +00:00
|
|
|
extern const mp_obj_module_t mp_module_btree;
|
2015-01-01 20:27:54 +00:00
|
|
|
|
2017-01-21 12:17:51 +00:00
|
|
|
extern const char *MICROPY_PY_BUILTINS_HELP_TEXT;
|
|
|
|
|
2015-01-01 20:27:54 +00:00
|
|
|
#endif // __MICROPY_INCLUDED_PY_BUILTIN_H__
|