py/modbuiltins: Add additional macro for extending builtins.
Mainly useful for defining additional globals in boards and variants.
This commit is contained in:
parent
df3f59ca4b
commit
22cf0940e1
|
@ -775,6 +775,7 @@ STATIC const mp_rom_map_elem_t mp_module_builtins_globals_table[] = {
|
||||||
|
|
||||||
// Extra builtins as defined by a port
|
// Extra builtins as defined by a port
|
||||||
MICROPY_PORT_BUILTINS
|
MICROPY_PORT_BUILTINS
|
||||||
|
MICROPY_PORT_EXTRA_BUILTINS
|
||||||
};
|
};
|
||||||
|
|
||||||
MP_DEFINE_CONST_DICT(mp_module_builtins_globals, mp_module_builtins_globals_table);
|
MP_DEFINE_CONST_DICT(mp_module_builtins_globals, mp_module_builtins_globals_table);
|
||||||
|
|
|
@ -1581,6 +1581,12 @@ typedef double mp_float_t;
|
||||||
#define MICROPY_PORT_BUILTINS
|
#define MICROPY_PORT_BUILTINS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Additional builtin function definitions for extension by command-line, boards or variants.
|
||||||
|
// See modbuiltins.c:mp_module_builtins_globals_table for format.
|
||||||
|
#ifndef MICROPY_PORT_EXTRA_BUILTINS
|
||||||
|
#define MICROPY_PORT_EXTRA_BUILTINS
|
||||||
|
#endif
|
||||||
|
|
||||||
// Additional builtin module definitions - see objmodule.c:mp_builtin_module_table for format.
|
// Additional builtin module definitions - see objmodule.c:mp_builtin_module_table for format.
|
||||||
#ifndef MICROPY_PORT_BUILTIN_MODULES
|
#ifndef MICROPY_PORT_BUILTIN_MODULES
|
||||||
#define MICROPY_PORT_BUILTIN_MODULES
|
#define MICROPY_PORT_BUILTIN_MODULES
|
||||||
|
|
Loading…
Reference in New Issue