Fix last commit.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@36798 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Niels Grewe 2013-07-02 14:32:32 +00:00
parent 2891af1ce9
commit ea707114bf
2 changed files with 11 additions and 11 deletions

View File

@ -26,11 +26,14 @@
#import "DKInterface.h"
#import "DKMethod.h"
#import "DKMethodReturn.h"
#import "DKIntrospectionParserDelegate.h"
#import <Foundation/NSData.h>
#import <Foundation/NSLock.h>
#import <Foundation/NSException.h>
#import <Foundation/NSMethodSignature.h>
#import <Foundation/NSInvocation.h>
#import <Foundation/NSXMLParser.h>
#if __OBJC_GC__
#import <Foundation/NSGarbageCollector.h>
#endif
@ -235,20 +238,16 @@
return [DKPort _DBusDefaultObjectPathVTable];
}
- (BOOL)_loadIntrospectionFromFile: (NSString*)path withError: (out NSError**) error
- (BOOL)_loadIntrospectionFromFile: (NSString*)path
{
NSError *localError = nil;
NSData *data = [NSData dataWithContentsOfFile: path options: 0 error: &localError];
if (localError)
NSData *data = [[NSData alloc] initWithContentsOfFile: path];
if (data == nil)
{
if (NULL != error)
{
*error = localError;
}
return NO;
return NO;
}
NSXMLParser *parser = [[NSXMLParser alloc] initWithData: data];
DKIntrospectionParserDelegte *delegate =
DKIntrospectionParserDelegate *delegate =
[[DKIntrospectionParserDelegate alloc] initWithParentForNodes: self];
NS_DURING
{
@ -256,6 +255,7 @@
}
NS_HANDLER
{
[data release];
[parser release];
[delegate release];
[localException raise];

View File

@ -922,7 +922,7 @@ NSString *kDKDBusDocType = @"<!DOCTYPE node PUBLIC \"-//freedesktop//DTD D-BUS O
[condition lock];
if (BUILDING_CACHE == state)
if (DK_BUILDING_CACHE == state)
{
// Set up parser and delegate:
parser = [[NSXMLParser alloc] initWithData: introspectionData];