summaryrefslogtreecommitdiff
path: root/extmod
diff options
context:
space:
mode:
authorDan Halbert <halbert@halwitz.org>2018-01-24 16:57:46 -0500
committerDan Halbert <halbert@halwitz.org>2018-01-24 19:24:36 -0500
commit302ad40fb28e96809b42c3387b6422994e032b21 (patch)
treec68af5f3e68352b49159e3d403bdb2fd0ce6d760 /extmod
parent5de29acbd2764e334d010ec3d476c779fde7142d (diff)
Revert "alloca seems buggy on M4"
This reverts commit 4b1e9d8f92aa948f8ecccf364edcb911a135f2c8.
Diffstat (limited to 'extmod')
-rw-r--r--extmod/modure.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/extmod/modure.c b/extmod/modure.c
index 3358b8e21..78de4706d 100644
--- a/extmod/modure.c
+++ b/extmod/modure.c
@@ -144,7 +144,7 @@ STATIC mp_obj_t re_split(size_t n_args, const mp_obj_t *args) {
}
mp_obj_t retval = mp_obj_new_list(0, NULL);
- const char* caps[caps_num];
+ const char **caps = alloca(caps_num * sizeof(char*));
while (true) {
// cast is a workaround for a bug in msvc: it treats const char** as a const pointer instead of a pointer to pointer to const char
memset((char**)caps, 0, caps_num * sizeof(char*));