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
72732fea
Commit
72732fea
authored
Jun 08, 2017
by
Damien George
Browse files
py/persistentcode: Allow to compile with complex numbers disabled.
parent
4d2778c9
Changes
1
Hide whitespace changes
Inline
Side-by-side
py/persistentcode.c
View file @
72732fea
...
...
@@ -286,11 +286,13 @@ STATIC void save_obj(mp_print_t *print, mp_obj_t o) {
byte
obj_type
;
if
(
MP_OBJ_IS_TYPE
(
o
,
&
mp_type_int
))
{
obj_type
=
'i'
;
}
else
if
(
mp_obj_is_float
(
o
))
{
obj_type
=
'f'
;
}
else
{
assert
(
MP_OBJ_IS_TYPE
(
o
,
&
mp_type_complex
));
#if MICROPY_PY_BUILTINS_COMPLEX
}
else
if
(
MP_OBJ_IS_TYPE
(
o
,
&
mp_type_complex
))
{
obj_type
=
'c'
;
#endif
}
else
{
assert
(
mp_obj_is_float
(
o
));
obj_type
=
'f'
;
}
vstr_t
vstr
;
mp_print_t
pr
;
...
...
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