git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@24655 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2007-02-19 19:11:50 +00:00
parent 1584fa95dc
commit 7be42e2944
3 changed files with 39 additions and 9 deletions

View file

@ -1,3 +1,10 @@
2007-02-19 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSRunLoop.m: ([performSelector:target:argument:order:modes:])
Alter to retain target and arguments to match MacOS-X (bug #19099)
* Source/NSString.m: Fixup removal of leading path separator when
appending path component.
2007-02-17 Richard Frith-Macdonald <rfm@gnu.org>
* configure.ac: Use gnustep-config if available.

View file

@ -99,6 +99,13 @@ static NSDate *theFuture = nil;
@implementation GSRunLoopPerformer
- (void) dealloc
{
RELEASE(target);
RELEASE(argument);
[super dealloc];
}
- (void) fire
{
[target performSelector: selector withObject: argument];
@ -113,8 +120,8 @@ static NSDate *theFuture = nil;
if (self)
{
selector = aSelector;
target = aTarget;
argument = anArgument;
target = RETAIN(aTarget);
argument = RETAIN(anArgument);
order = theOrder;
}
return self;
@ -1176,7 +1183,7 @@ static NSComparisonResult tSort(GSIArrayItem i0, GSIArrayItem i1)
* Sets up sending of aSelector to target with argument.<br />
* The selector is sent before the next runloop iteration (unless
* cancelled before then) in any of the specified modes.<br />
* The target and argument objects are <em>not</em> retained.<br />
* The target and argument objects are retained.<br />
* The order value is used to determine the order in which messages
* are sent if multiple messages have been set up. Messages with a lower
* order value are sent first.<br />

View file

@ -3096,13 +3096,29 @@ static NSFileManager *fm = nil;
/* If the 'component' has a leading path separator (or drive spec
* in windows) then we need to find its length so we can strip it.
*/
if (aLength > 0 && [aString characterAtIndex: 0] != '~')
root = rootOf(aString, aLength);
if (root > 0)
{
root = rootOf(aString, aLength);
}
else
{
root = 0;
unichar c = [aString characterAtIndex: 0];
if (c == '~')
{
root = 0;
}
else if (root > 1 && pathSepMember(c))
{
int i;
for (i = 1; i < root; i++)
{
c = [aString characterAtIndex: i];
if (!pathSepMember(c))
{
break;
}
}
root = i;
}
}
if (length == 0)