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

@@ -218,7 +218,7 @@ int main(int argc, char **argv) {
// test_obj = TestClass()
// test_obj.attr = 42
mp_obj_t test_class_type, test_class_instance;
test_class_type = mp_obj_new_type(qstr_from_str_static("TestClass"), mp_obj_new_dict(0));
test_class_type = mp_obj_new_type(qstr_from_str_static("TestClass"), mp_const_empty_tuple, mp_obj_new_dict(0));
rt_store_name(qstr_from_str_static("test_obj"), test_class_instance = rt_call_function_0(test_class_type));
rt_store_attr(test_class_instance, qstr_from_str_static("attr"), mp_obj_new_int(42));