diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-07-28 14:38:25 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-07-28 14:38:25 +0400 |
commit | 4982f200fadd15bb733128ae03ed737549e2657c (patch) | |
tree | c2756d5ea66603f34c3e1fb547bb008a4278d57e /source/blender/blenlib/BLI_array.h | |
parent | 72f29170325e6c01afb667be209ea5939b445551 (diff) |
move alloca define into its own header since its not related to BLI_array
Diffstat (limited to 'source/blender/blenlib/BLI_array.h')
-rw-r--r-- | source/blender/blenlib/BLI_array.h | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/source/blender/blenlib/BLI_array.h b/source/blender/blenlib/BLI_array.h index 252b37d9aae..c7b8521f9fa 100644 --- a/source/blender/blenlib/BLI_array.h +++ b/source/blender/blenlib/BLI_array.h @@ -173,31 +173,4 @@ void _bli_array_grow_func(void **arr_p, const void *arr_static, MEM_freeN(arr); \ } (void)0 - -/* alloca */ -#ifdef _MSC_VER -# define alloca _alloca -#endif - -#if defined(__MINGW32__) -# include <malloc.h> /* mingw needs for alloca() */ -#endif - -#if defined(__GNUC__) || defined(__clang__) -#define BLI_array_alloca(arr, realsize) \ - (typeof(arr))alloca(sizeof(*arr) * (realsize)) - -#define BLI_array_alloca_and_count(arr, realsize) \ - (typeof(arr))alloca(sizeof(*arr) * (realsize)); \ - const int _##arr##_count = (realsize) - -#else -#define BLI_array_alloca(arr, realsize) \ - alloca(sizeof(*arr) * (realsize)) - -#define BLI_array_alloca_and_count(arr, realsize) \ - alloca(sizeof(*arr) * (realsize)); \ - const int _##arr##_count = (realsize) -#endif - #endif /* __BLI_ARRAY_H__ */ |