summaryrefslogtreecommitdiffstatshomepage
path: root/py/runtime.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/runtime.c')
-rw-r--r--py/runtime.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/py/runtime.c b/py/runtime.c
index 8852b7d80d..ea75280ce4 100644
--- a/py/runtime.c
+++ b/py/runtime.c
@@ -69,12 +69,13 @@ 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
- mp_emit_glue_init();
+ // __debug__ enabled by default
+ mp_set_debug(true);
// init global module stuff
mp_module_init();
@@ -90,7 +91,6 @@ void mp_init(void) {
void mp_deinit(void) {
//mp_obj_dict_free(&dict_main);
mp_module_deinit();
- mp_emit_glue_deinit();
// call port specific deinitialization if any
#ifdef MICROPY_PORT_INIT_FUNC
@@ -200,7 +200,7 @@ mp_obj_t mp_unary_op(int op, mp_obj_t arg) {
mp_obj_type_t *type = mp_obj_get_type(arg);
if (type->unary_op != NULL) {
mp_obj_t result = type->unary_op(op, arg);
- if (result != MP_OBJ_NOT_SUPPORTED) {
+ if (result != MP_OBJ_NULL) {
return result;
}
}
@@ -439,7 +439,7 @@ mp_obj_t mp_binary_op(int op, mp_obj_t lhs, mp_obj_t rhs) {
mp_obj_type_t *type = mp_obj_get_type(rhs);
if (type->binary_op != NULL) {
mp_obj_t res = type->binary_op(op, rhs, lhs);
- if (res != MP_OBJ_NOT_SUPPORTED) {
+ if (res != MP_OBJ_NULL) {
return res;
}
}
@@ -467,7 +467,7 @@ generic_binary_op:
type = mp_obj_get_type(lhs);
if (type->binary_op != NULL) {
mp_obj_t result = type->binary_op(op, lhs, rhs);
- if (result != MP_OBJ_NOT_SUPPORTED) {
+ if (result != MP_OBJ_NULL) {
return result;
}
}