Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
1954d802
Commit
1954d802
authored
Mar 17, 2015
by
Paul Sokolovsky
Browse files
objtype: Clarify comment why we call mp_load_method_maybe() for native sub-obj.
parent
49fe6dc8
Changes
1
Hide whitespace changes
Inline
Side-by-side
py/objtype.c
View file @
1954d802
...
...
@@ -152,8 +152,9 @@ STATIC void mp_obj_class_lookup(struct class_lookup_data *lookup, const mp_obj_
}
}
// Try this for completeness, but all native methods should be statically defined
// in locals_dict, and would be handled by above.
// Previous code block takes care about attributes defined in .locals_dict,
// but some attributes of native types may be handled using .load_attr method,
// so make sure we try to lookup those too.
if
(
lookup
->
obj
!=
MP_OBJ_NULL
&&
!
lookup
->
is_type
&&
is_native_type
(
type
)
&&
type
!=
&
mp_type_object
/* object is not a real type */
)
{
mp_load_method_maybe
(
lookup
->
obj
->
subobj
[
0
],
lookup
->
attr
,
lookup
->
dest
);
if
(
lookup
->
dest
[
0
]
!=
MP_OBJ_NULL
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment