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
564e4645
Commit
564e4645
authored
Jul 12, 2014
by
Paul Sokolovsky
Browse files
py: Add generic helper to align a pointer.
parent
58c9586c
Changes
1
Hide whitespace changes
Inline
Side-by-side
py/misc.h
View file @
564e4645
...
...
@@ -84,6 +84,9 @@ int m_get_peak_bytes_allocated(void);
// get the number of elements in a fixed-size array
#define MP_ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
// align ptr to the nearest multiple of "alignment"
#define MP_ALIGN(ptr, alignment) (void*)(((mp_uint_t)(ptr) + ((alignment) - 1)) & ~((alignment) - 1))
/** unichar / UTF-8 *********************************************/
typedef
int
unichar
;
// TODO
...
...
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