From 3bc492ec69140c91314e98a5465e3a4d7253d5d6 Mon Sep 17 00:00:00 2001 From: Krasimir Angelov Date: Wed, 25 Jan 2023 20:20:32 +0100 Subject: [PATCH] use alloca for compatibility with VC++ --- src/runtime/python/ffi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/python/ffi.c b/src/runtime/python/ffi.c index 3c8115127..8b3884ae3 100644 --- a/src/runtime/python/ffi.c +++ b/src/runtime/python/ffi.c @@ -631,7 +631,7 @@ match_type(PgfMarshaller *this, PgfUnmarshaller *u, PgfType ty) } Py_ssize_t n_exprs = PySequence_Size(type->exprs); - PgfExpr exprs[n_exprs]; + PgfExpr *exprs = (PgfExpr *) alloca(n_exprs*sizeof(PgfExpr)); for (Py_ssize_t i = 0; i < n_exprs; i++) { exprs[i] = (PgfExpr)PySequence_ITEM(type->exprs, i); }