diff options
| author | Scott Shawcroft <scott@tannewt.org> | 2018-01-24 09:04:31 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-01-24 09:04:31 -0800 |
| commit | a5bfbbc12a95684371a76cd87585299e5e874552 (patch) | |
| tree | 27a8fbafbd45c6123480cf6438ee0a7cfa485fcc /extmod | |
| parent | fe851fc15e2f02734133c9a2874bf3b407332f65 (diff) | |
| parent | 1e94c4240cb12fcbb65831e608a9408e1e76fd87 (diff) | |
Merge pull request #548 from dhalbert/3.0_alloca_problem_issue_521
alloca seems buggy on M4
Diffstat (limited to 'extmod')
| -rw-r--r-- | extmod/modure.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/extmod/modure.c b/extmod/modure.c index 78de4706d..3358b8e21 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 = alloca(caps_num * sizeof(char*)); + const char* caps[caps_num]; 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*)); |
