Skip to content

Commit 2b7236d

Browse files
committed
py: Make it easy to build without MICROPY_PY_BUILTINS_COMPLEX.
Automagically skip related modules.
1 parent 519cef8 commit 2b7236d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

py/modcmath.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
#include "py/builtin.h"
2828

29-
#if MICROPY_PY_BUILTINS_FLOAT && MICROPY_PY_CMATH
29+
#if MICROPY_PY_BUILTINS_FLOAT && MICROPY_PY_BUILTINS_COMPLEX && MICROPY_PY_CMATH
3030

3131
#include <math.h>
3232

py/objmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ STATIC const mp_rom_map_elem_t mp_builtin_module_table[] = {
150150
#if MICROPY_PY_MATH
151151
{ MP_ROM_QSTR(MP_QSTR_math), MP_ROM_PTR(&mp_module_math) },
152152
#endif
153-
#if MICROPY_PY_CMATH
153+
#if MICROPY_PY_BUILTINS_COMPLEX && MICROPY_PY_CMATH
154154
{ MP_ROM_QSTR(MP_QSTR_cmath), MP_ROM_PTR(&mp_module_cmath) },
155155
#endif
156156
#endif

0 commit comments

Comments
 (0)