Commit 781947af authored by Damien George's avatar Damien George

stm32/mpconfigport.h: Remove malloc/free/realloc helper macros.

These macros are unused, and they can conflict with other entities by the
same name.  If needed they can be provided as static inline functions, or
just functions.

Fixes issue #4559.
parent 1556af19
......@@ -365,13 +365,5 @@ static inline mp_uint_t disable_irq(void) {
// We need an implementation of the log2 function which is not a macro
#define MP_NEED_LOG2 (1)
// There is no classical C heap in bare-metal ports, only Python
// garbage-collected heap. For completeness, emulate C heap via
// GC heap. Note that MicroPython core never uses malloc() and friends,
// so these defines are mostly to help extension module writers.
#define malloc(n) m_malloc(n)
#define free(p) m_free(p)
#define realloc(p, n) m_realloc(p, n)
// We need to provide a declaration/definition of alloca()
#include <alloca.h>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment