mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
implement new MacOS-X method.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@26742 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
6a1a276e1f
commit
ca4c3d0477
2 changed files with 24 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
|||
2008-07-02 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSIndexSet.m: Implement ([-countOfIndexesInRange:])
|
||||
|
||||
2008-06-30 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/GSFFIInvocation.m:
|
||||
|
|
|
@ -234,7 +234,26 @@ static unsigned posForIndex(GSIArray array, unsigned index)
|
|||
|
||||
- (NSUInteger) countOfIndexesInRange: (NSRange)range
|
||||
{
|
||||
return 0;
|
||||
if (_array == 0 || GSIArrayCount(_array) == 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
unsigned count = GSIArrayCount(_array);
|
||||
unsigned total = 0;
|
||||
unsigned i = 0;
|
||||
|
||||
while (i < count)
|
||||
{
|
||||
NSRange r = GSIArrayItemAtIndex(_array, i).ext;
|
||||
|
||||
r = NSIntersectionRange(r, range);
|
||||
total += r.length;
|
||||
i++;
|
||||
}
|
||||
return total;
|
||||
}
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
|
|
Loading…
Reference in a new issue