diff options
| author | Fabian Vogt <fabian@ritter-vogt.de> | 2014-09-03 16:59:33 +0200 |
|---|---|---|
| committer | Fabian Vogt <fabian@ritter-vogt.de> | 2014-09-03 23:07:42 +0200 |
| commit | b7235b8412a7511c94b31c0391eaf5c1b35ed3a8 (patch) | |
| tree | 2112ee4a17967fe8bf1cedcc59d1934434bad309 /py/mpconfig.h | |
| parent | fc54250d3158bcd897d43187b822765fb97f369f (diff) | |
Add cache flush in py/asmarm.c and add new MP_PLAT_ALLOC_EXEC and MP_PLAT_FREE_EXEC macros
Fixes issue #840
Diffstat (limited to 'py/mpconfig.h')
| -rw-r--r-- | py/mpconfig.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/py/mpconfig.h b/py/mpconfig.h index 2b89fab23..78c288d7c 100644 --- a/py/mpconfig.h +++ b/py/mpconfig.h @@ -440,6 +440,14 @@ typedef double mp_float_t; #define MICROPY_MAKE_POINTER_CALLABLE(p) (p) #endif +#ifndef MP_PLAT_ALLOC_EXEC +#define MP_PLAT_ALLOC_EXEC(min_size, ptr, size) do { *ptr = m_new(byte, min_size); *size = min_size; } while(0) +#endif + +#ifndef MP_PLAT_FREE_EXEC +#define MP_PLAT_FREE_EXEC(ptr, size) m_del(byte, ptr, size) +#endif + // printf format spec to use for mp_int_t and friends #ifndef INT_FMT #ifdef __LP64__ |
