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
add6f455
Commit
add6f455
authored
Dec 04, 2015
by
Paul Sokolovsky
Browse files
extmod/moductypes: set_aligned(): Handle INT64/UINT64.
parent
7a99639c
Changes
1
Hide whitespace changes
Inline
Side-by-side
extmod/moductypes.c
View file @
add6f455
...
...
@@ -359,6 +359,15 @@ STATIC void set_aligned(uint val_type, void *p, mp_int_t index, mp_obj_t val) {
((
uint32_t
*
)
p
)[
index
]
=
(
uint32_t
)
v
;
return
;
case
INT32
:
((
int32_t
*
)
p
)[
index
]
=
(
int32_t
)
v
;
return
;
case
INT64
:
case
UINT64
:
if
(
sizeof
(
mp_int_t
)
==
8
)
{
((
uint64_t
*
)
p
)[
index
]
=
(
uint64_t
)
v
;
}
else
{
// TODO: Doesn't offer atomic store semantics, but should at least try
set_unaligned
(
val_type
,
p
,
MP_ENDIANNESS_BIG
,
val
);
}
return
;
default:
assert
(
0
);
}
...
...
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