mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-11 00:30:49 +00:00
MacOS0X compatibility tweak
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@20073 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
3bb04e95cd
commit
2ff6f4fbf1
2 changed files with 22 additions and 10 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2004-09-16 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
* Source/NSArray.m:
|
||||||
|
Make objects perform selector in same order as MacOS-X
|
||||||
|
|
||||||
2004-09-16 David Ayers <d.ayers@inode.at>
|
2004-09-16 David Ayers <d.ayers@inode.at>
|
||||||
|
|
||||||
* Headers/Additions/GNUstepBase/GSObjCRuntime.h: Define encoding
|
* Headers/Additions/GNUstepBase/GSObjCRuntime.h: Define encoding
|
||||||
|
|
|
@ -863,18 +863,21 @@ static SEL rlSel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Makes each object in the array perform aSelector.<br />
|
* Makes each object in the array perform aSelector.<br />
|
||||||
* This is done sequentially from the last to the first object.
|
* This is done sequentially from the first to the last object.
|
||||||
*/
|
*/
|
||||||
- (void) makeObjectsPerformSelector: (SEL)aSelector
|
- (void) makeObjectsPerformSelector: (SEL)aSelector
|
||||||
{
|
{
|
||||||
unsigned i = [self count];
|
unsigned c = [self count];
|
||||||
|
|
||||||
if (i > 0)
|
if (c > 0)
|
||||||
{
|
{
|
||||||
IMP get = [self methodForSelector: oaiSel];
|
IMP get = [self methodForSelector: oaiSel];
|
||||||
|
unsigned i = 0;
|
||||||
|
|
||||||
while (i-- > 0)
|
while (i < c)
|
||||||
[(*get)(self, oaiSel, i) performSelector: aSelector];
|
{
|
||||||
|
[(*get)(self, oaiSel, i++) performSelector: aSelector];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -888,18 +891,22 @@ static SEL rlSel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Makes each object in the array perform aSelector with arg.<br />
|
* Makes each object in the array perform aSelector with arg.<br />
|
||||||
* This is done sequentially from the last to the first object.
|
* This is done sequentially from the first to the last object.
|
||||||
*/
|
*/
|
||||||
- (void) makeObjectsPerformSelector: (SEL)aSelector withObject: (id)arg
|
- (void) makeObjectsPerformSelector: (SEL)aSelector withObject: (id)arg
|
||||||
{
|
{
|
||||||
unsigned i = [self count];
|
unsigned c = [self count];
|
||||||
|
|
||||||
if (i > 0)
|
if (c > 0)
|
||||||
{
|
{
|
||||||
IMP get = [self methodForSelector: oaiSel];
|
IMP get = [self methodForSelector: oaiSel];
|
||||||
|
unsigned i = 0;
|
||||||
|
|
||||||
while (i-- > 0)
|
while (i < c)
|
||||||
[(*get)(self, oaiSel, i) performSelector: aSelector withObject: arg];
|
{
|
||||||
|
[(*get)(self, oaiSel, i++) performSelector: aSelector
|
||||||
|
withObject: arg];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue