[CELT-dev] [PATCH] Varlength arrays fix for C89
thorvald at natvig.com
thorvald at natvig.com
Fri Dec 11 04:19:09 PST 2009
From: Thorvald Natvig <slicer at users.sourceforge.net>
---
libcelt/plc.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/libcelt/plc.c b/libcelt/plc.c
index 6b2f3e0..5689652 100644
--- a/libcelt/plc.c
+++ b/libcelt/plc.c
@@ -106,7 +106,9 @@ void _celt_autocorr(
{
float d;
int i;
- float xx[n];
+ VARDECL(float, xx);
+ SAVE_STACK;
+ ALLOC(xx, n, float);
for (i=0;i<n;i++)
xx[i] = x[i];
for (i=0;i<overlap;i++)
@@ -122,4 +124,5 @@ void _celt_autocorr(
lag--;
}
ac[0] += 10;
+ RESTORE_STACK;
}
--
1.6.4.msysgit.0.19.gd78f4
More information about the celt-dev
mailing list