summaryrefslogtreecommitdiff
path: root/py/runtime.c
diff options
context:
space:
mode:
authorbvernoux <bvernoux@gmail.com>2014-06-03 19:26:34 +0200
committerbvernoux <bvernoux@gmail.com>2014-06-03 19:26:34 +0200
commit82560fce75ab0307182c943d564202e55fca6c09 (patch)
treed20162c8647ddb2451fdb76024761821b43149e8 /py/runtime.c
parent0a1dbfe02f4a693c202b97aafcf0b5d0ba050812 (diff)
parentb294a7e3c9b84aad6c331128a51e0d69e7845141 (diff)
Merge branch 'master' of https://github.com/micropython/micropython
Diffstat (limited to 'py/runtime.c')
-rw-r--r--py/runtime.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/py/runtime.c b/py/runtime.c
index ecaf40deb..f13cc1d89 100644
--- a/py/runtime.c
+++ b/py/runtime.c
@@ -45,6 +45,7 @@
#include "bc.h"
#include "smallint.h"
#include "objgenerator.h"
+#include "lexer.h"
#if 0 // print debugging info
#define DEBUG_PRINT (1)
@@ -74,8 +75,8 @@ void mp_init(void) {
MICROPY_PORT_INIT_FUNC;
#endif
- // __debug__ enabled by default
- mp_set_debug(true);
+ // optimization disabled by default
+ mp_optimise_value = 0;
// init global module stuff
mp_module_init();
@@ -525,10 +526,7 @@ mp_obj_t mp_call_function_n_kw(mp_obj_t fun_in, uint n_args, uint n_kw, const mp
// do the call
if (type->call != NULL) {
- mp_obj_t res = type->call(fun_in, n_args, n_kw, args);
- if (res != NULL) {
- return res;
- }
+ return type->call(fun_in, n_args, n_kw, args);
}
nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_TypeError, "'%s' object is not callable", mp_obj_get_type_str(fun_in)));