mirror of
https://github.com/micropython/micropython.git
synced 2026-01-08 21:20:13 +01:00
py: Rename old const type objects to mp_type_* for consistency.
This commit is contained in:
@@ -45,7 +45,7 @@ void slice_print(void (*print)(void *env, const char *fmt, ...), void *env, mp_o
|
||||
print(env, "slice(" INT_FMT ", " INT_FMT ")", o->start, o->stop);
|
||||
}
|
||||
|
||||
const mp_obj_type_t slice_type = {
|
||||
const mp_obj_type_t mp_type_slice = {
|
||||
{ &mp_type_type },
|
||||
.name = MP_QSTR_slice,
|
||||
.print = slice_print,
|
||||
@@ -72,14 +72,14 @@ mp_obj_t mp_obj_new_slice(mp_obj_t ostart, mp_obj_t ostop, mp_obj_t ostep) {
|
||||
}
|
||||
}
|
||||
mp_obj_slice_t *o = m_new(mp_obj_slice_t, 1);
|
||||
o->base.type = &slice_type;
|
||||
o->base.type = &mp_type_slice;
|
||||
o->start = start;
|
||||
o->stop = stop;
|
||||
return (mp_obj_t)o;
|
||||
}
|
||||
|
||||
void mp_obj_slice_get(mp_obj_t self_in, machine_int_t *start, machine_int_t *stop, machine_int_t *step) {
|
||||
assert(MP_OBJ_IS_TYPE(self_in, &slice_type));
|
||||
assert(MP_OBJ_IS_TYPE(self_in, &mp_type_slice));
|
||||
mp_obj_slice_t *self = self_in;
|
||||
*start = self->start;
|
||||
*stop = self->stop;
|
||||
|
||||
Reference in New Issue
Block a user