From 2b7236d249bc87be1f9967a46693683c8722c351 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Mon, 7 Dec 2015 00:18:44 +0200 Subject: [PATCH] py: Make it easy to build without MICROPY_PY_BUILTINS_COMPLEX. Automagically skip related modules. --- py/modcmath.c | 2 +- py/objmodule.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/py/modcmath.c b/py/modcmath.c index 570341d911..33fe9c73f5 100644 --- a/py/modcmath.c +++ b/py/modcmath.c @@ -26,7 +26,7 @@ #include "py/builtin.h" -#if MICROPY_PY_BUILTINS_FLOAT && MICROPY_PY_CMATH +#if MICROPY_PY_BUILTINS_FLOAT && MICROPY_PY_BUILTINS_COMPLEX && MICROPY_PY_CMATH #include diff --git a/py/objmodule.c b/py/objmodule.c index 1f1b7ab1f5..71b0b0a269 100644 --- a/py/objmodule.c +++ b/py/objmodule.c @@ -150,7 +150,7 @@ STATIC const mp_rom_map_elem_t mp_builtin_module_table[] = { #if MICROPY_PY_MATH { MP_ROM_QSTR(MP_QSTR_math), MP_ROM_PTR(&mp_module_math) }, #endif -#if MICROPY_PY_CMATH +#if MICROPY_PY_BUILTINS_COMPLEX && MICROPY_PY_CMATH { MP_ROM_QSTR(MP_QSTR_cmath), MP_ROM_PTR(&mp_module_cmath) }, #endif #endif