From f06d0839bdaff783d8902bcedb572cbaabb6447a Mon Sep 17 00:00:00 2001 From: Tom Collins Date: Thu, 12 Jan 2017 16:08:51 -0800 Subject: py/modsys: update conditionals for code referencing sys.stdout Working on a build with PY_IO enabled (for PY_UJSON support) but PY_SYS_STDFILES disabled (no filesystem). There are multiple references to mp_sys_stdout_obj that should only be enabled if both PY_IO and PY_SYS_STDFILES are enabled. --- py/mpprint.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'py/mpprint.h') diff --git a/py/mpprint.h b/py/mpprint.h index f9204e322..4fc904a20 100644 --- a/py/mpprint.h +++ b/py/mpprint.h @@ -39,7 +39,7 @@ #define PF_FLAG_ADD_PERCENT (0x100) #define PF_FLAG_SHOW_OCTAL_LETTER (0x200) -#if MICROPY_PY_IO +#if MICROPY_PY_IO && MICROPY_PY_SYS_STDFILES # define MP_PYTHON_PRINTER &mp_sys_stdout_print #else # define MP_PYTHON_PRINTER &mp_plat_print @@ -55,7 +55,7 @@ typedef struct _mp_print_t { // All (non-debug) prints go through one of the two interfaces below. // 1) Wrapper for platform print function, which wraps MP_PLAT_PRINT_STRN. extern const mp_print_t mp_plat_print; -#if MICROPY_PY_IO +#if MICROPY_PY_IO && MICROPY_PY_SYS_STDFILES // 2) Wrapper for printing to sys.stdout. extern const mp_print_t mp_sys_stdout_print; #endif -- cgit v1.2.3