summaryrefslogtreecommitdiff
path: root/py/mpconfig.h
diff options
context:
space:
mode:
authorFabian Vogt <fabian@ritter-vogt.de>2014-09-03 16:59:33 +0200
committerFabian Vogt <fabian@ritter-vogt.de>2014-09-03 23:07:42 +0200
commitb7235b8412a7511c94b31c0391eaf5c1b35ed3a8 (patch)
tree2112ee4a17967fe8bf1cedcc59d1934434bad309 /py/mpconfig.h
parentfc54250d3158bcd897d43187b822765fb97f369f (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.h8
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__