mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-25 01:31:08 +00:00
ifix for issue #500
This commit is contained in:
parent
0057f3f4e9
commit
b39853e21a
3 changed files with 18 additions and 3 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2025-04-01 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
* Source/NSOrderedSet.m: Fix for git issue #500
|
||||||
|
|
||||||
2025-03-21 Earl Robsham <earl.robsham@savant.com>
|
2025-03-21 Earl Robsham <earl.robsham@savant.com>
|
||||||
* Headers/Foundation/NSURLHandle.h:
|
* Headers/Foundation/NSURLHandle.h:
|
||||||
* Sources/externs.m:
|
* Sources/externs.m:
|
||||||
|
|
|
@ -1415,12 +1415,12 @@ static SEL remSel;
|
||||||
|
|
||||||
if (count > 0)
|
if (count > 0)
|
||||||
{
|
{
|
||||||
NSUInteger i;
|
|
||||||
IMP rem = [self methodForSelector: remSel];
|
IMP rem = [self methodForSelector: remSel];
|
||||||
|
|
||||||
for (i = 0; i < count; i++)
|
while (count-- > 0)
|
||||||
{
|
{
|
||||||
NSUInteger idx = indexArray[i];
|
NSUInteger idx = indexArray[count];
|
||||||
|
|
||||||
(*rem)(self, remSel, idx);
|
(*rem)(self, remSel, idx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -361,6 +361,17 @@ int main()
|
||||||
[uobj containsObject: @"Now"]),
|
[uobj containsObject: @"Now"]),
|
||||||
"Object unarchives correctly from macOS archive")
|
"Object unarchives correctly from macOS archive")
|
||||||
|
|
||||||
|
[array removeAllObjects];
|
||||||
|
[array addObject: @"1"];
|
||||||
|
[array addObject: @"2"];
|
||||||
|
[array addObject: @"3"];
|
||||||
|
[array addObject: @"4"];
|
||||||
|
[array addObject: @"5"];
|
||||||
|
|
||||||
|
NSMutableOrderedSet *ms = [NSMutableOrderedSet orderedSetWithArray: array];
|
||||||
|
[ms removeObjectsAtIndexes:
|
||||||
|
[NSIndexSet indexSetWithIndexesInRange: NSMakeRange(0, [array count])]];
|
||||||
|
|
||||||
test_NSObject(@"NSOrderedSet", testObjs);
|
test_NSObject(@"NSOrderedSet", testObjs);
|
||||||
test_NSCoding(testObjs);
|
test_NSCoding(testObjs);
|
||||||
test_NSCopying(@"NSOrderedSet", @"NSMutableOrderedSet", testObjs, YES, NO);
|
test_NSCopying(@"NSOrderedSet", @"NSMutableOrderedSet", testObjs, YES, NO);
|
||||||
|
|
Loading…
Reference in a new issue