Support for alloca (untested)
authorjm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800>
Fri, 11 Mar 2005 20:08:06 +0000 (20:08 +0000)
committerjm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800>
Fri, 11 Mar 2005 20:08:06 +0000 (20:08 +0000)
git-svn-id: http://svn.xiph.org/trunk/speex@9063 0101bb08-14d6-0310-b084-bc0e0c8e3800

libspeex/stack_alloc.h

index fabce1d..cd32ca5 100644 (file)
 
 #endif
 
-#ifdef VAR_ARRAYS
+#if defined(VAR_ARRAYS)
 #define VARDECL(var) 
 #define ALLOC(var, size, type) type var[size]
+#elif defined(USE_ALLOCA)
+#define VARDECL(var) var
+#define ALLOC(var, size, type) var = alloca(sizeof(type)*size)
 #else
 #define VARDECL(var) var
 #define ALLOC(var, size, type) var = PUSH(stack, size, type)