diff options
| author | Damien George | 2014-03-29 13:43:38 +0000 |
|---|---|---|
| committer | Damien George | 2014-03-29 13:43:38 +0000 |
| commit | 3e1a5c10c5bf0a38c2ed3b9986b43b8cb8227b2f (patch) | |
| tree | 76c6f10fcf7d669c52d2b9d84483e8c4f937b9d9 /stmhal | |
| parent | 07ddab529cb0953c473d30795e4dc3c6dfff0d89 (diff) | |
py: Rename old const type objects to mp_type_* for consistency.
Diffstat (limited to 'stmhal')
| -rw-r--r-- | stmhal/help.c | 2 | ||||
| -rw-r--r-- | stmhal/i2c.c | 2 | ||||
| -rw-r--r-- | stmhal/modos.c | 8 |
3 files changed, 6 insertions, 6 deletions
diff --git a/stmhal/help.c b/stmhal/help.c index 5cedac9d9..3ab69ec62 100644 --- a/stmhal/help.c +++ b/stmhal/help.c @@ -68,7 +68,7 @@ STATIC mp_obj_t pyb_help(uint n_args, const mp_obj_t *args) { } else { type = mp_obj_get_type(args[0]); } - if (type->locals_dict != MP_OBJ_NULL && MP_OBJ_IS_TYPE(type->locals_dict, &dict_type)) { + if (type->locals_dict != MP_OBJ_NULL && MP_OBJ_IS_TYPE(type->locals_dict, &mp_type_dict)) { map = mp_obj_dict_get_map(type->locals_dict); } } diff --git a/stmhal/i2c.c b/stmhal/i2c.c index 9556e32c9..ab37f756b 100644 --- a/stmhal/i2c.c +++ b/stmhal/i2c.c @@ -124,7 +124,7 @@ STATIC mp_obj_t pyb_i2c_mem_read(uint n_args, const mp_obj_t *args) { machine_uint_t n = mp_obj_get_int(args[3]); byte *data; - mp_obj_t o = mp_obj_str_builder_start(&bytes_type, n, &data); + mp_obj_t o = mp_obj_str_builder_start(&mp_type_bytes, n, &data); HAL_StatusTypeDef status = HAL_I2C_Mem_Read(self->i2c_handle, i2c_addr, mem_addr, I2C_MEMADD_SIZE_8BIT, data, n, 200); //printf("Read got %d\n", status); diff --git a/stmhal/modos.c b/stmhal/modos.c index 0ec9fcbb9..606dbe927 100644 --- a/stmhal/modos.c +++ b/stmhal/modos.c @@ -17,11 +17,11 @@ static char lfn[_MAX_LFN + 1]; /* Buffer to store the LFN */ #endif STATIC mp_obj_t os_listdir(uint n_args, const mp_obj_t *args) { - const mp_obj_type_t *local_str_type = &str_type; + const mp_obj_type_t *local_str_type = &mp_type_str; const char *path; if (n_args == 1) { - if (mp_obj_get_type(args[0]) == &bytes_type) { - local_str_type = &bytes_type; + if (mp_obj_get_type(args[0]) == &mp_type_bytes) { + local_str_type = &mp_type_bytes; } path = mp_obj_str_get_str(args[0]); } else { @@ -138,7 +138,7 @@ MP_DEFINE_CONST_FUN_OBJ_0(os_sync_obj, os_sync); STATIC mp_obj_t os_urandom(mp_obj_t num) { machine_int_t n = mp_obj_get_int(num); byte *data; - mp_obj_t o = mp_obj_str_builder_start(&bytes_type, n, &data); + mp_obj_t o = mp_obj_str_builder_start(&mp_type_bytes, n, &data); for (int i = 0; i < n; i++) { data[i] = rng_get(); } |
