From 41de093a324dc849cdb0ba6292afc6ce544afded Mon Sep 17 00:00:00 2001 From: Andrew McCallum Date: Wed, 28 Jun 1995 23:21:00 +0000 Subject: [PATCH] ([Collection -_safeWithElementsCallNoRetain:]): Use malloc not alloca. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@455 72102866-910b-0410-8b05-ffd578937521 --- Source/Collection.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Collection.m b/Source/Collection.m index 0ebdea83d..104fba8ec 100644 --- a/Source/Collection.m +++ b/Source/Collection.m @@ -68,7 +68,7 @@ - (void) _safeWithElementsCallNoRetain: (void(*)(elt))aFunc { int c = [self count]; - elt *elts = (elt*) alloca(c * sizeof(elt)); + elt *elts = (elt*) (*objc_malloc) (c * sizeof(elt)); int i = 0; void fill_elts(elt e) { @@ -77,6 +77,7 @@ [self withElementsCall:fill_elts]; for (i = 0; i < c; i++) aFunc(elts[i]); + (*objc_free) (elts); } static void