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.
This commit is contained in:
Damien George 2019-03-26 18:40:05 +11:00
parent 1556af19bf
commit 781947afdc
1 changed files with 0 additions and 8 deletions

View File

@ -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>