mirror of
https://github.com/micropython/micropython.git
synced 2026-01-04 11:10:14 +01:00
py: Add support for __debug__ constant.
__debug__ now resolves to True or False. Its value needs to be set by mp_set_debug(). TODO: call mp_set_debug in unix/ port. TODO: optimise away "if False:" statements in compiler.
This commit is contained in:
@@ -69,11 +69,14 @@ const mp_obj_module_t mp_module___main__ = {
|
||||
};
|
||||
|
||||
void mp_init(void) {
|
||||
// call port specific initialization if any
|
||||
// call port specific initialization if any
|
||||
#ifdef MICROPY_PORT_INIT_FUNC
|
||||
MICROPY_PORT_INIT_FUNC;
|
||||
#endif
|
||||
|
||||
// __debug__ enabled by default
|
||||
mp_set_debug(true);
|
||||
|
||||
mp_emit_glue_init();
|
||||
|
||||
// init global module stuff
|
||||
|
||||
Reference in New Issue
Block a user