diff options
author | Laurens Valk <laurens@pybricks.com> | 2023-03-09 15:52:51 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2023-03-10 13:29:54 +1100 |
commit | f3a596db7dffa97c507bc80b78d8160c5eae276d (patch) | |
tree | 9c4bd066f1765d77adf972597faf13aa89af45cf /py/builtinimport.c | |
parent | 78dc2db2ba7e14a44f00fc07dd37f3323fcaf251 (diff) |
py/builtinimport: Fix unix port build with external imports disabled.
Without this, building the unix port variants gives:
ports/unix/main.c:667: undefined reference to `mp_obj_is_package',
when MICROPY_ENABLE_EXTERNAL_IMPORT is 0.
Signed-off-by: Laurens Valk <laurens@pybricks.com>
Diffstat (limited to 'py/builtinimport.c')
-rw-r--r-- | py/builtinimport.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/py/builtinimport.c b/py/builtinimport.c index 6f1f7b485..e620c0377 100644 --- a/py/builtinimport.c +++ b/py/builtinimport.c @@ -574,6 +574,10 @@ mp_obj_t mp_builtin___import___default(size_t n_args, const mp_obj_t *args) { #else // MICROPY_ENABLE_EXTERNAL_IMPORT +bool mp_obj_is_package(mp_obj_t module) { + return false; +} + mp_obj_t mp_builtin___import___default(size_t n_args, const mp_obj_t *args) { // Check that it's not a relative import if (n_args >= 5 && MP_OBJ_SMALL_INT_VALUE(args[4]) != 0) { |