Mercurial > hg > octave-nkf
diff configure.in @ 8377:25bc2d31e1bf
improve OCTAVE_LOCAL_BUFFER
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Wed, 29 Oct 2008 16:52:10 +0100 |
parents | 9238637cb81c |
children | 654bcfb937bf |
line wrap: on
line diff
--- a/configure.in +++ b/configure.in @@ -1932,32 +1932,6 @@ #define OCTAVE_HAVE_SIG_JUMP #endif -/* Always use vector<T>, since we sometimes allocate large chunks - of memory and that can cause trouble due to stack size limits. - - Note that using auto_ptr is not appropriate because it uses delete, - not delete[] and we need the latter to properly handle arrays - allocated with new[size]. - - Use < T > instead of <T> to avoid problems if T is a template type - (say, foo<int>) and the preprocessor fails to insert a space and - generates <foo<int>>. - -#if defined (HAVE_DYNAMIC_AUTO_ARRAYS) - -#define OCTAVE_LOCAL_BUFFER(T, buf, size) \ - T buf[size] - -#else - -*/ - -#define OCTAVE_LOCAL_BUFFER(T, buf, size) \ - std::vector< T > buf ## _vector (size); \ - T *buf = ((size) > 0 ? &(buf ## _vector[0]) : 0) - -/* #endif */ - #if defined (__DECCXX) #define __USE_STD_IOSTREAM #endif