1
0
forked from GitHub/gf-core

use alloca for compatibility with VC++

This commit is contained in:
Krasimir Angelov
2023-01-25 20:20:32 +01:00
parent 3f44c3541a
commit 3bc492ec69

View File

@@ -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);
}