We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f0fbab7 commit f32020eCopy full SHA for f32020e
1 file changed
py/mpconfig.h
@@ -189,6 +189,16 @@
189
#define MICROPY_STACKLESS_STRICT (0)
190
#endif
191
192
+// Don't use alloca calls. As alloca() is not part of ANSI C, this
193
+// workaround option is provided for compilers lacking this de-facto
194
+// standard function. The way it works is allocating from heap, and
195
+// relying on garbage collection to free it eventually. This is of
196
+// course much less optimal than real alloca().
197
+#if defined(MICROPY_NO_ALLOCA) && MICROPY_NO_ALLOCA
198
+#undef alloca
199
+#define alloca(x) m_malloc(x)
200
+#endif
201
+
202
/*****************************************************************************/
203
/* Micro Python emitters */
204
0 commit comments