Bugfixes for last patch

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27715 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2009-01-28 23:43:05 +00:00
parent f2a92b88ec
commit 76a38be99b
3 changed files with 8 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2009-01-28 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSEnumerator.m: Fix bug in fast enumeration code.
* Source/GSArray.m: Fix bug in array insertion introduced by last patch.
2009-01-28 David Chisnall <csdavec@swansea.ac.uk>
* Headers/Foundation/NSEnumerator.h:

View file

@ -619,7 +619,8 @@ static Class GSInlineArrayClass;
_capacity += _grow_factor;
_grow_factor = _capacity/2;
}
memmove(&_contents_array[index], &_contents_array[index+1], _count - index);
memmove(&_contents_array[index+1], &_contents_array[index],
(_count - index) * sizeof(id));
/*
* Make sure the array is 'sane' so that it can be deallocated
* safely by an autorelease pool if the '[anObject retain]' causes

View file

@ -91,7 +91,7 @@
}
*(stackbuf+i) = next;
}
state->itemsPtr;
state->itemsPtr = stackbuf;
return len;
}
@end