mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Minor tidyup
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@8255 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
8a15563642
commit
f12b01891b
1 changed files with 9 additions and 10 deletions
|
@ -194,8 +194,6 @@ static Class NSURLHandleClass = 0;
|
|||
|
||||
- (void) cancelLoadInBackground
|
||||
{
|
||||
_status = NSURLHandleNotLoaded;
|
||||
DESTROY(_data);
|
||||
[_clients makeObjectsPerformSelector:
|
||||
@selector(URLHandleResourceDidCancelLoading:)
|
||||
withObject: self];
|
||||
|
@ -260,6 +258,10 @@ static Class NSURLHandleClass = 0;
|
|||
|
||||
if (loadComplete == YES)
|
||||
{
|
||||
id tmp = _data;
|
||||
|
||||
_data = [tmp copy];
|
||||
RELEASE(tmp);
|
||||
/*
|
||||
* Let clients know we have finished loading.
|
||||
*/
|
||||
|
@ -272,14 +274,8 @@ static Class NSURLHandleClass = 0;
|
|||
|
||||
- (void) endLoadInBackground
|
||||
{
|
||||
if (_status == NSURLHandleLoadInProgress)
|
||||
{
|
||||
id tmp = _data;
|
||||
|
||||
_data = [tmp copy];
|
||||
RELEASE(tmp);
|
||||
}
|
||||
_status = NSURLHandleNotLoaded;
|
||||
DESTROY(_data);
|
||||
}
|
||||
|
||||
- (NSString*) failureReason
|
||||
|
@ -326,7 +322,6 @@ static Class NSURLHandleClass = 0;
|
|||
{
|
||||
[self didLoadBytes: d loadComplete: YES];
|
||||
}
|
||||
[self endLoadInBackground];
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -372,6 +367,10 @@ static Class NSURLHandleClass = 0;
|
|||
{
|
||||
return [self availableResourceData];
|
||||
}
|
||||
else if (_status == NSURLHandleLoadInProgress)
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
else
|
||||
{
|
||||
NSData *d = [self loadInForeground];
|
||||
|
|
Loading…
Reference in a new issue