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
e09320ad
Commit
e09320ad
authored
Apr 01, 2014
by
Damien George
Browse files
py: Remove implicit conversion from int to float.
parent
46330bd9
Changes
1
Hide whitespace changes
Inline
Side-by-side
py/obj.c
View file @
e09320ad
...
...
@@ -198,10 +198,6 @@ machine_int_t mp_obj_get_int(mp_obj_t arg) {
return
MP_OBJ_SMALL_INT_VALUE
(
arg
);
}
else
if
(
MP_OBJ_IS_TYPE
(
arg
,
&
mp_type_int
))
{
return
mp_obj_int_get_checked
(
arg
);
#if MICROPY_ENABLE_FLOAT
}
else
if
(
MP_OBJ_IS_TYPE
(
arg
,
&
mp_type_float
))
{
return
mp_obj_float_get
(
arg
);
#endif
}
else
{
nlr_jump
(
mp_obj_new_exception_msg_varg
(
&
mp_type_TypeError
,
"can't convert %s to int"
,
mp_obj_get_type_str
(
arg
)));
}
...
...
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