Browse Source

objtype: mp_obj_class_lookup: Remove implausible condition.

We already have branch for lookup->is_type == true, so here it's guaranteed
to be false.
pull/1157/head
Paul Sokolovsky 10 years ago
parent
commit
f0dc0d50e3
  1. 2
      py/objtype.c

2
py/objtype.c

@ -135,7 +135,7 @@ STATIC void mp_obj_class_lookup(struct class_lookup_data *lookup, const mp_obj_
// not type where we found a class method. // not type where we found a class method.
const mp_obj_type_t *org_type = (const mp_obj_type_t*)lookup->obj; const mp_obj_type_t *org_type = (const mp_obj_type_t*)lookup->obj;
instance_convert_return_attr(NULL, org_type, elem->value, lookup->dest); instance_convert_return_attr(NULL, org_type, elem->value, lookup->dest);
} else if (lookup->obj != MP_OBJ_NULL && !lookup->is_type && is_native_type(type) && type != &mp_type_object /* object is not a real type */) { } else if (lookup->obj != MP_OBJ_NULL && is_native_type(type) && type != &mp_type_object /* object is not a real type */) {
instance_convert_return_attr(lookup->obj->subobj[0], type, elem->value, lookup->dest); instance_convert_return_attr(lookup->obj->subobj[0], type, elem->value, lookup->dest);
} else { } else {
instance_convert_return_attr(lookup->obj, type, elem->value, lookup->dest); instance_convert_return_attr(lookup->obj, type, elem->value, lookup->dest);

Loading…
Cancel
Save