diff options
author | Erik Moqvist <erik.moqvist@gmail.com> | 2016-10-16 16:40:56 +0200 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2016-10-21 18:30:58 +1100 |
commit | f64e806f50606902323c62cf7b479922724022b6 (patch) | |
tree | dc403c21023a00f9f374412e7ce21622819ac3aa /py | |
parent | 571e6f26dbd7e0e38441bc402f76d293303063b2 (diff) |
lib/utils/pyhelp.c: Use mp_printf() instead of printf()
This patch introduces MP_PYTHON_PRINTER for general use.
Diffstat (limited to 'py')
-rw-r--r-- | py/mpprint.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/py/mpprint.h b/py/mpprint.h index 6e47409ec..f9204e322 100644 --- a/py/mpprint.h +++ b/py/mpprint.h @@ -39,6 +39,12 @@ #define PF_FLAG_ADD_PERCENT (0x100) #define PF_FLAG_SHOW_OCTAL_LETTER (0x200) +#if MICROPY_PY_IO +# define MP_PYTHON_PRINTER &mp_sys_stdout_print +#else +# define MP_PYTHON_PRINTER &mp_plat_print +#endif + typedef void (*mp_print_strn_t)(void *data, const char *str, size_t len); typedef struct _mp_print_t { |