Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
71fec076
Commit
71fec076
authored
Sep 27, 2016
by
Damien George
Browse files
py/vm: Use MP_OBJ_FROM_PTR to cast a type to an object.
parent
38b54b65
Changes
1
Hide whitespace changes
Inline
Side-by-side
py/vm.c
View file @
71fec076
...
...
@@ -626,7 +626,7 @@ dispatch_loop:
// stack: (..., __exit__, ctx_mgr, exc_instance)
// Need to pass (exc_type, exc_instance, None) as arguments to __exit__.
sp
[
1
]
=
sp
[
0
];
sp
[
0
]
=
mp_obj_get_type
(
sp
[
0
]);
sp
[
0
]
=
MP_OBJ_FROM_PTR
(
mp_obj_get_type
(
sp
[
0
])
)
;
sp
[
2
]
=
mp_const_none
;
sp
-=
2
;
mp_obj_t
ret_value
=
mp_call_method_n_kw
(
3
,
0
,
sp
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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