diff options
author | Damien George <damien@micropython.org> | 2022-04-07 22:18:37 +1000 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2022-04-14 22:44:04 +1000 |
commit | 42d0bd2c17fd76860c3dc0ef5c62faa48efeb121 (patch) | |
tree | 9bba461ddcca0641750c9b761bdaa6d0aabf7433 /py/persistentcode.h | |
parent | 988827b85a9b09f1164e101ea2520562dd31634e (diff) |
py/persistentcode: Define enum values for obj types instead of letters.
To keep the separate parts of the code that use these values in sync. And
make it easier to add new object types.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'py/persistentcode.h')
-rw-r--r-- | py/persistentcode.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/py/persistentcode.h b/py/persistentcode.h index 1991ba26f..7426029ad 100644 --- a/py/persistentcode.h +++ b/py/persistentcode.h @@ -102,6 +102,16 @@ enum { MP_NATIVE_ARCH_XTENSAWIN, }; +enum { + MP_PERSISTENT_OBJ_FUN_TABLE = 0, + MP_PERSISTENT_OBJ_ELLIPSIS, + MP_PERSISTENT_OBJ_STR, + MP_PERSISTENT_OBJ_BYTES, + MP_PERSISTENT_OBJ_INT, + MP_PERSISTENT_OBJ_FLOAT, + MP_PERSISTENT_OBJ_COMPLEX, +}; + mp_compiled_module_t mp_raw_code_load(mp_reader_t *reader, mp_module_context_t *ctx); mp_compiled_module_t mp_raw_code_load_mem(const byte *buf, size_t len, mp_module_context_t *ctx); mp_compiled_module_t mp_raw_code_load_file(const char *filename, mp_module_context_t *ctx); |