diff options
author | Damien George <damien.p.george@gmail.com> | 2015-03-19 00:21:29 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2015-03-19 00:25:33 +0000 |
commit | 2e2e404ff77e95dbe4fee0f19c91913a5888fb6f (patch) | |
tree | 32989d5722293edb145295ae137efc32cfdf6f3a /py/modbuiltins.c | |
parent | 02894b51f48779569e72dff2c2a1edfd6d74b6c1 (diff) | |
download | micropython-2e2e404ff77e95dbe4fee0f19c91913a5888fb6f.tar.gz micropython-2e2e404ff77e95dbe4fee0f19c91913a5888fb6f.zip |
py: Allow to compile with extra warnings (sign-compare, unused-param).
Diffstat (limited to 'py/modbuiltins.c')
-rw-r--r-- | py/modbuiltins.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/py/modbuiltins.c b/py/modbuiltins.c index 78fa4afc33..0440fc72b7 100644 --- a/py/modbuiltins.c +++ b/py/modbuiltins.c @@ -41,6 +41,10 @@ #include <math.h> #endif +#if MICROPY_PY_IO +extern mp_uint_t mp_sys_stdout_obj; // type is irrelevant, just need pointer +#endif + // args[0] is function from class body // args[1] is class name // args[2:] are base objects @@ -403,7 +407,6 @@ STATIC mp_obj_t mp_builtin_print(mp_uint_t n_args, const mp_obj_t *args, mp_map_ end_data = mp_obj_str_get_data(end_elem->value, &end_len); } #if MICROPY_PY_IO - extern mp_uint_t mp_sys_stdout_obj; // type is irrelevant, just need pointer mp_obj_t stream_obj = &mp_sys_stdout_obj; mp_map_elem_t *file_elem = mp_map_lookup(kwargs, MP_OBJ_NEW_QSTR(MP_QSTR_file), MP_MAP_LOOKUP); if (file_elem != NULL && file_elem->value != mp_const_none) { @@ -440,7 +443,6 @@ MP_DEFINE_CONST_FUN_OBJ_KW(mp_builtin_print_obj, 0, mp_builtin_print); STATIC mp_obj_t mp_builtin___repl_print__(mp_obj_t o) { if (o != mp_const_none) { #if MICROPY_PY_IO - extern mp_uint_t mp_sys_stdout_obj; // type is irrelevant, just need pointer pfenv_t pfenv; pfenv.data = &mp_sys_stdout_obj; pfenv.print_strn = (void (*)(void *, const char *, mp_uint_t))mp_stream_write; |