Commit aa4d19a0 authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

objtype: Comments for duplicating code in runtime.c.

parent 1a7403bb
......@@ -121,11 +121,13 @@ STATIC void mp_obj_class_lookup(mp_obj_instance_t *o, const mp_obj_type_t *type,
if (o != MP_OBJ_NULL && is_native_type(type)) {
dest[1] = o->subobj[0];
// TODO: Sensibly, we should call instance_convert_return_attr() here,
// instead of multiple places later. Also, this code duplicates runtime.c much.
// Try this for completeness, by all native methods should be statically defined
// Try this for completeness, but all native methods should be statically defined
// in locals_dict, and would be handled by above.
if (o != MP_OBJ_NULL && is_native_type(type)) {
mp_load_method_maybe(o->subobj[0], attr, dest);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment