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>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user