We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 58c9586 commit 564e464Copy full SHA for 564e464
1 file changed
py/misc.h
@@ -84,6 +84,9 @@ int m_get_peak_bytes_allocated(void);
84
// get the number of elements in a fixed-size array
85
#define MP_ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
86
87
+// align ptr to the nearest multiple of "alignment"
88
+#define MP_ALIGN(ptr, alignment) (void*)(((mp_uint_t)(ptr) + ((alignment) - 1)) & ~((alignment) - 1))
89
+
90
/** unichar / UTF-8 *********************************************/
91
92
typedef int unichar; // TODO
0 commit comments