From 8d5b623c24d736204f1cf4d4af345ed03f9e67ab Mon Sep 17 00:00:00 2001 From: David Ayers Date: Sun, 2 Dec 2007 21:13:09 +0000 Subject: [PATCH] * Source/NSURLResponse.m: Add explicit include of NSDictionary.h. Use available dictionary declartion. * Source/NSURLProtocol.m: Add explicit import of NSData.h. * Source/NSSerializer.m: Add explicit import of NSEnumerator.h. * Source/NSURLConnection.m ([-initWithResponsePointer:andErrorPointer:]): Add declaration. * Source/NSKeyValueMutableSet.m: Various non-functional variable and parameter renames to avoid bogus compiler warnings. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@25661 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 6 ++++++ Source/NSKeyValueMutableSet.m | 18 +++++++++--------- Source/NSSerializer.m | 1 + Source/NSURLConnection.m | 2 ++ Source/NSURLProtocol.m | 1 + Source/NSURLResponse.m | 15 ++++++++------- 6 files changed, 27 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index 944adcb28..05fab8292 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,9 +11,15 @@ instances. * Source/NSCalendarDate.m: Add explicit include of NSDictionary.h. + * Source/NSURLResponse.m: Ditto. Use available dictionary declartion. + * Source/NSURLProtocol.m: Add explicit import of NSData.h. + * Source/NSSerializer.m: Add explicit import of NSEnumerator.h. + * Source/NSURLConnection.m + ([-initWithResponsePointer:andErrorPointer:]): Add declaration. * Source/NSKeyValueMutableArray.m: Various non-functional variable and parameter renames to avoid bogus compiler warnings. + * Source/NSKeyValueMutableSet.m: Ditto. 2007-11-30 Richard Frith-Macdonald diff --git a/Source/NSKeyValueMutableSet.m b/Source/NSKeyValueMutableSet.m index 6714fc343..708a17f6b 100644 --- a/Source/NSKeyValueMutableSet.m +++ b/Source/NSKeyValueMutableSet.m @@ -91,25 +91,25 @@ NSKeyValueMutableSet *proxy; unsigned size = [aKey maximumLengthOfBytesUsingEncoding: NSUTF8StringEncoding]; - char key[size + 1]; + char keybuf[size + 1]; - [aKey getCString: key + [aKey getCString: keybuf maxLength: size + 1 encoding: NSUTF8StringEncoding]; - if (islower(*key)) + if (islower(*keybuf)) { - *key = toupper(*key); + *keybuf = toupper(*keybuf); } proxy = [NSKeyValueFastMutableSet setForKey: aKey ofObject: anObject - withCapitalizedKey: key]; + withCapitalizedKey: keybuf]; if (proxy == nil) { proxy = [NSKeyValueSlowMutableSet setForKey: aKey ofObject: anObject - withCapitalizedKey: key]; + withCapitalizedKey: keybuf]; if (proxy == nil) { @@ -172,7 +172,7 @@ @implementation NSKeyValueFastMutableSet + (id) setForKey: (NSString *)aKey ofObject: (id)anObject - withCapitalizedKey: (char *)capitalized + withCapitalizedKey: (const char *)capitalized { return [[[self alloc] initWithKey: aKey ofObject: anObject @@ -551,9 +551,9 @@ @implementation NSKeyValueIvarMutableSet -+ (id) setForKey: (NSString *)key ofObject: (id)anObject ++ (id) setForKey: (NSString *)aKey ofObject: (id)anObject { - return [[[self alloc] initWithKey: key ofObject: anObject] autorelease]; + return [[[self alloc] initWithKey: aKey ofObject: anObject] autorelease]; } - (id) initWithKey: (NSString *)aKey ofObject: (id)anObject diff --git a/Source/NSSerializer.m b/Source/NSSerializer.m index 366469261..47d1ee1c7 100644 --- a/Source/NSSerializer.m +++ b/Source/NSSerializer.m @@ -32,6 +32,7 @@ #include "Foundation/NSArray.h" #include "Foundation/NSString.h" #include "Foundation/NSException.h" +#include "Foundation/NSEnumerator.h" #include "Foundation/NSProxy.h" #include "Foundation/NSLock.h" #include "Foundation/NSSet.h" diff --git a/Source/NSURLConnection.m b/Source/NSURLConnection.m index 6f631d1ce..2d687c36a 100644 --- a/Source/NSURLConnection.m +++ b/Source/NSURLConnection.m @@ -35,6 +35,8 @@ BOOL _done; } +- (id) initWithResponsePointer: (NSURLResponse **)response + andErrorPointer: (NSError **)error; - (NSData*) _data; - (BOOL) _done; - (void) _setConnection: (NSURLConnection *)c; diff --git a/Source/NSURLProtocol.m b/Source/NSURLProtocol.m index cd76f8a33..b2188a1cf 100644 --- a/Source/NSURLProtocol.m +++ b/Source/NSURLProtocol.m @@ -25,6 +25,7 @@ #import #import #import +#import #import "GNUstepBase/GSMime.h" diff --git a/Source/NSURLResponse.m b/Source/NSURLResponse.m index e486dd995..81fc81772 100644 --- a/Source/NSURLResponse.m +++ b/Source/NSURLResponse.m @@ -26,6 +26,7 @@ #import "GSPrivate.h" #import "Foundation/NSCoder.h" +#import "Foundation/NSDictionary.h" #import "Foundation/NSScanner.h" #import "NSCallBacks.h" #import "GNUstepBase/GSMime.h" @@ -33,13 +34,13 @@ // Internal data storage typedef struct { - long long expectedContentLength; - NSURL *URL; - NSString *MIMEType; - NSString *textEncodingName; - NSString *statusText; - _GSMutableInsensitiveDictionary *headers; - int statusCode; + long long expectedContentLength; + NSURL *URL; + NSString *MIMEType; + NSString *textEncodingName; + NSString *statusText; + NSMutableDictionary *headers; /* _GSMutableInsensitiveDictionary */ + int statusCode; } Internal; typedef struct {