py: Implement base class lookup, issubclass, isinstance.

This commit is contained in:
Damien George
2014-01-09 21:43:51 +00:00
parent 062478e66d
commit 004cdcebfe
9 changed files with 136 additions and 36 deletions

View File

@@ -136,6 +136,7 @@ mp_obj_t mp_obj_new_tuple_reverse(uint n, const mp_obj_t *items) {
}
void mp_obj_tuple_get(mp_obj_t self_in, uint *len, mp_obj_t **items) {
assert(MP_OBJ_IS_TYPE(self_in, &tuple_type));
mp_obj_tuple_t *self = self_in;
*len = self->len;
*items = &self->items[0];