summaryrefslogtreecommitdiffstats
path: root/contrib/libobjc/sarray.c
diff options
context:
space:
mode:
authorkan <kan@FreeBSD.org>2004-07-28 03:12:12 +0000
committerkan <kan@FreeBSD.org>2004-07-28 03:12:12 +0000
commitfaa0a30e665e4b99547718fea8c46655b053f4a4 (patch)
tree692b0b1ffb09a0fba199d48352cc84bcdeadcdb9 /contrib/libobjc/sarray.c
parent96bad46eee8bf907dceb152bbb9d128bed5a4956 (diff)
downloadFreeBSD-src-faa0a30e665e4b99547718fea8c46655b053f4a4.zip
FreeBSD-src-faa0a30e665e4b99547718fea8c46655b053f4a4.tar.gz
Gcc 3.4.2 20040728 Objective C support bits.
Diffstat (limited to 'contrib/libobjc/sarray.c')
-rw-r--r--contrib/libobjc/sarray.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/contrib/libobjc/sarray.c b/contrib/libobjc/sarray.c
index e78e36d..c37633b 100644
--- a/contrib/libobjc/sarray.c
+++ b/contrib/libobjc/sarray.c
@@ -1,20 +1,20 @@
/* Sparse Arrays for Objective C dispatch tables
Copyright (C) 1993, 1995, 1996, 2002 Free Software Foundation, Inc.
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify
+GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-GNU CC is distributed in the hope that it will be useful,
+GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with GNU CC; see the file COPYING. If not, write to
+along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
@@ -402,9 +402,6 @@ sarray_free (struct sarray *array) {
#else
old_buckets = array->buckets;
#endif
-
- if ((array->is_copy_of) && ((array->is_copy_of->ref_count - 1) == 0))
- sarray_free (array->is_copy_of);
/* Free all entries that do not point to empty_bucket */
for (counter = 0; counter <= old_max_index; counter++ ) {
@@ -462,6 +459,10 @@ sarray_free (struct sarray *array) {
#endif
+ /* If this is a copy, go ahead and decrement/deallocate the original */
+ if (array->is_copy_of)
+ sarray_free (array->is_copy_of);
+
/* free array */
sarray_free_garbage (array);
}
OpenPOWER on IntegriCloud