mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +00:00
fixups in changes made to avoid compiler warnings.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29261 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
93b94d87b2
commit
b43991f8f6
9 changed files with 52 additions and 49 deletions
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
|||
2010-01-11 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSMapTable.m:
|
||||
* Source/NSHashTable.m:
|
||||
* Source/NSPropertyList.m:
|
||||
* Source/GSStream.m:
|
||||
* Source/NSURLResponse.m:
|
||||
* Source/NSPointerArray.m:
|
||||
* Source/Additions/GSMime.m:
|
||||
* Source/NSURLRequest.m:
|
||||
Fix mistaken strategy for avoiding clang warnings.
|
||||
|
||||
2010-01-11 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSConcreteMapTable.m (NSCreateMapTableWithZone): Set the
|
||||
|
|
|
@ -2869,11 +2869,13 @@ NSDebugMLLog(@"GSMime", @"Header parsed - %@", info);
|
|||
|
||||
|
||||
|
||||
@interface _GSMutableInsensitiveDictionary : NSMutableDictionary
|
||||
@end
|
||||
|
||||
@implementation GSMimeHeader
|
||||
|
||||
static NSCharacterSet *nonToken = nil;
|
||||
static NSCharacterSet *tokenSet = nil;
|
||||
static Class dictClass = 0;
|
||||
|
||||
+ (void) initialize
|
||||
{
|
||||
|
@ -2899,7 +2901,6 @@ static Class dictClass = 0;
|
|||
{
|
||||
documentClass = [GSMimeDocument class];
|
||||
}
|
||||
dictClass = NSClassFromString(@"_GSMutableInsensitiveDictionary");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3496,7 +3497,7 @@ appendString(NSMutableData *m, unsigned offset, unsigned fold,
|
|||
{
|
||||
if (params == nil)
|
||||
{
|
||||
params = [dictClass new];
|
||||
params = [_GSMutableInsensitiveDictionary new];
|
||||
}
|
||||
[params setObject: v forKey: k];
|
||||
}
|
||||
|
@ -3516,7 +3517,7 @@ appendString(NSMutableData *m, unsigned offset, unsigned fold,
|
|||
NSEnumerator *e = [d keyEnumerator];
|
||||
NSString *k;
|
||||
|
||||
m = [[dictClass alloc] initWithCapacity: c];
|
||||
m = [[_GSMutableInsensitiveDictionary alloc] initWithCapacity: c];
|
||||
while ((k = [e nextObject]) != nil)
|
||||
{
|
||||
[m setObject: [d objectForKey: k]
|
||||
|
|
|
@ -945,18 +945,14 @@ static RunLoopEventType typeForStream(NSStream *aStream)
|
|||
|
||||
@end
|
||||
|
||||
@interface GSLocalServerStream : GSServerStream
|
||||
@end
|
||||
|
||||
@implementation GSServerStream
|
||||
|
||||
static Class localServerClass = 0;
|
||||
|
||||
+ (void) initialize
|
||||
{
|
||||
GSMakeWeakPointer(self, "delegate");
|
||||
if (localServerClass == 0)
|
||||
{
|
||||
localServerClass = NSClassFromString(@"GSLocalServerStream");
|
||||
}
|
||||
}
|
||||
|
||||
+ (id) serverStreamToAddr: (NSString*)addr port: (NSInteger)port
|
||||
|
@ -972,7 +968,7 @@ static Class localServerClass = 0;
|
|||
|
||||
+ (id) serverStreamToAddr: (NSString*)addr
|
||||
{
|
||||
return AUTORELEASE([[localServerClass alloc] initToAddr: addr]);
|
||||
return AUTORELEASE([[GSLocalServerStream alloc] initToAddr: addr]);
|
||||
}
|
||||
|
||||
- (id) initToAddr: (NSString*)addr port: (NSInteger)port
|
||||
|
@ -988,7 +984,7 @@ static Class localServerClass = 0;
|
|||
- (id) initToAddr: (NSString*)addr
|
||||
{
|
||||
RELEASE(self);
|
||||
return [[localServerClass alloc] initToAddr: addr];
|
||||
return [[GSLocalServerStream alloc] initToAddr: addr];
|
||||
}
|
||||
|
||||
- (void) acceptWithInputStream: (NSInputStream **)inputStream
|
||||
|
|
|
@ -37,6 +37,9 @@
|
|||
#include "NSCallBacks.h"
|
||||
#include "GSPrivate.h"
|
||||
|
||||
@interface NSConcreteHashTable : NSHashTable
|
||||
@end
|
||||
|
||||
@implementation NSHashTable
|
||||
|
||||
|
||||
|
@ -57,7 +60,7 @@ static Class concreteClass = 0;
|
|||
if (abstractClass == 0)
|
||||
{
|
||||
abstractClass = [NSHashTable class];
|
||||
concreteClass = NSClassFromString(@"NSConcreteHashTable");
|
||||
concreteClass = [NSConcreteHashTable class];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -36,6 +36,9 @@
|
|||
#include "Foundation/NSDebug.h"
|
||||
#include "NSCallBacks.h"
|
||||
|
||||
@interface NSConcreteMapTable : NSMapTable
|
||||
@end
|
||||
|
||||
@implementation NSMapTable
|
||||
|
||||
static Class abstractClass = 0;
|
||||
|
@ -55,7 +58,7 @@ static Class concreteClass = 0;
|
|||
if (abstractClass == 0)
|
||||
{
|
||||
abstractClass = [NSMapTable class];
|
||||
concreteClass = NSClassFromString(@"NSConcreteMapTable");
|
||||
concreteClass = [NSConcreteMapTable class];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -41,6 +41,16 @@
|
|||
static Class abstractClass = Nil;
|
||||
static Class concreteClass = Nil;
|
||||
|
||||
@interface NSConcretePointerArray : NSPointerArray
|
||||
{
|
||||
PFInfo _pf;
|
||||
NSUInteger _count;
|
||||
void **_contents;
|
||||
unsigned _capacity;
|
||||
unsigned _grow_factor;
|
||||
}
|
||||
@end
|
||||
|
||||
|
||||
@implementation NSPointerArray
|
||||
|
||||
|
@ -58,7 +68,7 @@ static Class concreteClass = Nil;
|
|||
if (abstractClass == Nil)
|
||||
{
|
||||
abstractClass = [NSPointerArray class];
|
||||
concreteClass = NSClassFromString(@"NSConcretePointerArray");
|
||||
concreteClass = [NSConcretePointerArray class];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -202,16 +212,6 @@ static Class concreteClass = Nil;
|
|||
|
||||
@end
|
||||
|
||||
@interface NSConcretePointerArray : NSPointerArray
|
||||
{
|
||||
PFInfo _pf;
|
||||
NSUInteger _count;
|
||||
void **_contents;
|
||||
unsigned _capacity;
|
||||
unsigned _grow_factor;
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation NSConcretePointerArray
|
||||
|
||||
- (void) _raiseRangeExceptionWithIndex: (NSUInteger)index from: (SEL)sel
|
||||
|
|
|
@ -112,15 +112,11 @@ extern BOOL GSScanDouble(unichar*, unsigned, double*);
|
|||
- (void) unescape;
|
||||
@end
|
||||
|
||||
@interface GSSloppyXMLParser : NSXMLParser
|
||||
@end
|
||||
|
||||
@implementation GSXMLPListParser
|
||||
|
||||
static Class theClass = 0;
|
||||
|
||||
+ (void) initialize
|
||||
{
|
||||
theClass = NSClassFromString(@"GSSloppyXMLParser");
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
RELEASE(key);
|
||||
|
@ -136,7 +132,7 @@ static Class theClass = 0;
|
|||
{
|
||||
if ((self = [super init]) != nil)
|
||||
{
|
||||
theParser = [[theClass alloc] initWithData: data];
|
||||
theParser = [[GSSloppyXMLParser alloc] initWithData: data];
|
||||
[theParser setDelegate: self];
|
||||
opts = options;
|
||||
}
|
||||
|
|
|
@ -51,6 +51,9 @@ typedef struct {
|
|||
#define this ((Internal*)(((priv*)self)->_NSURLRequestInternal))
|
||||
#define inst ((Internal*)(((priv*)o)->_NSURLRequestInternal))
|
||||
|
||||
@interface _GSMutableInsensitiveDictionary : NSMutableDictionary
|
||||
@end
|
||||
|
||||
@implementation NSURLRequest
|
||||
|
||||
+ (id) allocWithZone: (NSZone*)z
|
||||
|
@ -354,13 +357,6 @@ typedef struct {
|
|||
|
||||
@implementation NSMutableURLRequest (NSMutableHTTPURLRequest)
|
||||
|
||||
static Class dictClass = 0;
|
||||
|
||||
+ (void) initialize
|
||||
{
|
||||
dictClass = NSClassFromString(@"_GSMutableInsensitiveDictionary");
|
||||
}
|
||||
|
||||
- (void) addValue: (NSString *)value forHTTPHeaderField: (NSString *)field
|
||||
{
|
||||
NSString *old = [self valueForHTTPHeaderField: field];
|
||||
|
@ -422,7 +418,7 @@ static Class dictClass = 0;
|
|||
{
|
||||
if (this->headers == nil)
|
||||
{
|
||||
this->headers = [dictClass new];
|
||||
this->headers = [_GSMutableInsensitiveDictionary new];
|
||||
}
|
||||
[this->headers setObject: value forKey: field];
|
||||
}
|
||||
|
|
|
@ -50,15 +50,11 @@ typedef struct {
|
|||
#define inst ((Internal*)(((priv*)o)->_NSURLResponseInternal))
|
||||
|
||||
|
||||
@interface _GSMutableInsensitiveDictionary : NSMutableDictionary
|
||||
@end
|
||||
|
||||
@implementation NSURLResponse (Private)
|
||||
|
||||
static Class dictClass = 0;
|
||||
|
||||
+ (void) initialize
|
||||
{
|
||||
dictClass = NSClassFromString(@"_GSMutableInsensitiveDictionary");
|
||||
}
|
||||
|
||||
- (void) _setHeaders: (id)headers
|
||||
{
|
||||
NSEnumerator *e;
|
||||
|
@ -137,7 +133,7 @@ static Class dictClass = 0;
|
|||
{
|
||||
if (this->headers == 0)
|
||||
{
|
||||
this->headers = [dictClass new];
|
||||
this->headers = [_GSMutableInsensitiveDictionary new];
|
||||
}
|
||||
[this->headers setObject: value forKey: field];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue