py/nativeglue: Make mp_fun_table fixed size regardless of config.

So that mpy files with native code will always work correctly, and raise an
exception if a feature is used that is not supported by the runtime.
This commit is contained in:
Damien George
2019-09-26 16:24:06 +10:00
parent 7d58a197cf
commit 96f2a38075
2 changed files with 23 additions and 8 deletions

View File

@@ -173,10 +173,8 @@ typedef enum {
MP_F_BUILD_TUPLE,
MP_F_BUILD_LIST,
MP_F_BUILD_MAP,
#if MICROPY_PY_BUILTINS_SET
MP_F_BUILD_SET,
MP_F_STORE_SET,
#endif
MP_F_LIST_APPEND,
MP_F_STORE_MAP,
MP_F_MAKE_FUNCTION_FROM_RAW_CODE,
@@ -191,9 +189,7 @@ typedef enum {
MP_F_IMPORT_NAME,
MP_F_IMPORT_FROM,
MP_F_IMPORT_ALL,
#if MICROPY_PY_BUILTINS_SLICE
MP_F_NEW_SLICE,
#endif
MP_F_UNPACK_SEQUENCE,
MP_F_UNPACK_EX,
MP_F_DELETE_NAME,