Fix more unsigned int / int cases that should be NS[U]Integer

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31355 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
ericwa 2010-09-16 02:55:24 +00:00
parent 5af34bc87f
commit c9fb0577bd
11 changed files with 56 additions and 42 deletions

View file

@ -1,3 +1,17 @@
2010-09-15 Eric Wasylishen <ewasylishen@gmail.com>
* Source/GSSocketStream.m:
* Source/NSPortCoder.m:
* Source/NSSocketPort.m:
* Source/NSAttributedString.m:
* Source/NSKeyValueMutableSet.m:
* Source/NSKeyedUnarchiver.m:
* Source/NSUnarchiver.m:
* Source/GSAttributedString.m:
* Source/NSKeyValueMutableArray.m:
* Source/NSXMLParser.m: Fix more unsigned int / ints that should
be NSUInteger/NSInteger
2010-09-15 Eric Wasylishen <ewasylishen@gmail.com> 2010-09-15 Eric Wasylishen <ewasylishen@gmail.com>
* Source/objc-load.m: Don't compile the dynamic_handles code with libobjc2. * Source/objc-load.m: Don't compile the dynamic_handles code with libobjc2.

View file

@ -71,7 +71,7 @@ static NSDictionary *blank;
- (id) initWithString: (NSString*)aString - (id) initWithString: (NSString*)aString
attributes: (NSDictionary*)attributes; attributes: (NSDictionary*)attributes;
- (NSString*) string; - (NSString*) string;
- (NSDictionary*) attributesAtIndex: (unsigned)index - (NSDictionary*) attributesAtIndex: (NSUInteger)index
effectiveRange: (NSRange*)aRange; effectiveRange: (NSRange*)aRange;
@end @end
@ -86,7 +86,7 @@ static NSDictionary *blank;
- (id) initWithString: (NSString*)aString - (id) initWithString: (NSString*)aString
attributes: (NSDictionary*)attributes; attributes: (NSDictionary*)attributes;
- (NSString*) string; - (NSString*) string;
- (NSDictionary*) attributesAtIndex: (unsigned)index - (NSDictionary*) attributesAtIndex: (NSUInteger)index
effectiveRange: (NSRange*)aRange; effectiveRange: (NSRange*)aRange;
- (void) setAttributes: (NSDictionary*) attributes - (void) setAttributes: (NSDictionary*) attributes
range: (NSRange)range; range: (NSRange)range;
@ -496,7 +496,7 @@ _attributesAtIndexEffectiveRange(
return AUTORELEASE([_textChars copyWithZone: NSDefaultMallocZone()]); return AUTORELEASE([_textChars copyWithZone: NSDefaultMallocZone()]);
} }
- (NSDictionary*) attributesAtIndex: (unsigned)index - (NSDictionary*) attributesAtIndex: (NSUInteger)index
effectiveRange: (NSRange*)aRange effectiveRange: (NSRange*)aRange
{ {
return _attributesAtIndexEffectiveRange( return _attributesAtIndexEffectiveRange(
@ -603,7 +603,7 @@ SANITY();
return _textProxy; return _textProxy;
} }
- (NSDictionary*) attributesAtIndex: (unsigned)index - (NSDictionary*) attributesAtIndex: (NSUInteger)index
effectiveRange: (NSRange*)aRange effectiveRange: (NSRange*)aRange
{ {
unsigned dummy; unsigned dummy;

View file

@ -1837,7 +1837,7 @@ setNonBlocking(SOCKET fd)
return readLen; return readLen;
} }
- (BOOL) getBuffer: (uint8_t **)buffer length: (unsigned int *)len - (BOOL) getBuffer: (uint8_t **)buffer length: (NSUInteger *)len
{ {
return NO; return NO;
} }

View file

@ -1182,7 +1182,7 @@ appendUIntData(NSMutableData *d, NSUInteger i)
return [[_owner string] smallestEncoding]; return [[_owner string] smallestEncoding];
} }
- (NSInteger) _baseLength - (int) _baseLength
{ {
return [[_owner string] _baseLength]; return [[_owner string] _baseLength];
} }

View file

@ -130,7 +130,7 @@
return self; return self;
} }
- (unsigned) count - (NSUInteger) count
{ {
if (array == nil) if (array == nil)
{ {
@ -139,7 +139,7 @@
return [array count]; return [array count];
} }
- (id) objectAtIndex: (unsigned)index - (id) objectAtIndex: (NSUInteger)index
{ {
if (array == nil) if (array == nil)
{ {
@ -220,7 +220,7 @@
[super dealloc]; [super dealloc];
} }
- (void) removeObjectAtIndex: (unsigned)index - (void) removeObjectAtIndex: (NSUInteger)index
{ {
NSIndexSet *indexes = nil; NSIndexSet *indexes = nil;
@ -241,7 +241,7 @@
} }
} }
- (void) insertObject: (id)anObject atIndex: (unsigned)index - (void) insertObject: (id)anObject atIndex: (NSUInteger)index
{ {
NSIndexSet *indexes = nil; NSIndexSet *indexes = nil;
@ -263,7 +263,7 @@
} }
} }
- (void) replaceObjectAtIndex: (unsigned)index withObject: (id)anObject - (void) replaceObjectAtIndex: (NSUInteger)index withObject: (id)anObject
{ {
NSIndexSet *indexes = nil; NSIndexSet *indexes = nil;
BOOL triggerNotifications = !otherChangeInProgress; BOOL triggerNotifications = !otherChangeInProgress;
@ -331,7 +331,7 @@
return self; return self;
} }
- (void) removeObjectAtIndex: (unsigned)index - (void) removeObjectAtIndex: (NSUInteger)index
{ {
NSIndexSet *indexes = nil; NSIndexSet *indexes = nil;
NSMutableArray *temp; NSMutableArray *temp;
@ -358,7 +358,7 @@
} }
} }
- (void) insertObject: (id)anObject atIndex: (unsigned)index - (void) insertObject: (id)anObject atIndex: (NSUInteger)index
{ {
NSIndexSet *indexes = nil; NSIndexSet *indexes = nil;
NSMutableArray *temp; NSMutableArray *temp;
@ -385,7 +385,7 @@
} }
} }
- (void) replaceObjectAtIndex: (unsigned)index withObject: (id)anObject - (void) replaceObjectAtIndex: (NSUInteger)index withObject: (id)anObject
{ {
NSIndexSet *indexes = nil; NSIndexSet *indexes = nil;
NSMutableArray *temp; NSMutableArray *temp;
@ -469,7 +469,7 @@
forKey: key]; forKey: key];
} }
- (void) removeObjectAtIndex: (unsigned)index - (void) removeObjectAtIndex: (NSUInteger)index
{ {
NSIndexSet *indexes = [NSIndexSet indexSetWithIndex: index]; NSIndexSet *indexes = [NSIndexSet indexSetWithIndex: index];
@ -482,7 +482,7 @@
forKey: key]; forKey: key];
} }
- (void) insertObject: (id)anObject atIndex: (unsigned)index - (void) insertObject: (id)anObject atIndex: (NSUInteger)index
{ {
NSIndexSet *indexes = [NSIndexSet indexSetWithIndex: index]; NSIndexSet *indexes = [NSIndexSet indexSetWithIndex: index];
@ -508,7 +508,7 @@
forKey: key]; forKey: key];
} }
- (void) replaceObjectAtIndex: (unsigned)index withObject: (id)anObject - (void) replaceObjectAtIndex: (NSUInteger)index withObject: (id)anObject
{ {
NSIndexSet *indexes = [NSIndexSet indexSetWithIndex: index]; NSIndexSet *indexes = [NSIndexSet indexSetWithIndex: index];

View file

@ -132,7 +132,7 @@
return self; return self;
} }
- (unsigned) count - (NSUInteger) count
{ {
if (set == nil) if (set == nil)
{ {
@ -583,7 +583,7 @@
return self; return self;
} }
- (unsigned) count - (NSUInteger) count
{ {
return [set count]; return [set count];
} }

View file

@ -377,7 +377,7 @@ static NSMapTable *globalClassMap = 0;
} }
- (void) decodeArrayOfObjCType: (const char*)type - (void) decodeArrayOfObjCType: (const char*)type
count: (unsigned)expected count: (NSUInteger)expected
at: (void*)buf at: (void*)buf
{ {
id o = [self decodeObject]; id o = [self decodeObject];
@ -505,7 +505,7 @@ static NSMapTable *globalClassMap = 0;
return (int)i; return (int)i;
} }
- (int) decodeIntegerForKey: (NSString*)aKey - (NSInteger) decodeIntegerForKey: (NSString*)aKey
{ {
int64_t i = [self decodeInt64ForKey: aKey]; int64_t i = [self decodeInt64ForKey: aKey];

View file

@ -425,7 +425,7 @@ static IMP _xRefImp; /* Serialize a crossref. */
} }
- (void) decodeArrayOfObjCType: (const char*)type - (void) decodeArrayOfObjCType: (const char*)type
count: (unsigned)expected count: (NSUInteger)expected
at: (void*)buf at: (void*)buf
{ {
unsigned int i; unsigned int i;
@ -1089,7 +1089,7 @@ static IMP _xRefImp; /* Serialize a crossref. */
} }
- (void) encodeArrayOfObjCType: (const char*)type - (void) encodeArrayOfObjCType: (const char*)type
count: (unsigned)count count: (NSUInteger)count
at: (const void*)buf at: (const void*)buf
{ {
unsigned i; unsigned i;

View file

@ -2286,16 +2286,16 @@ static Class tcpPortClass;
* the start can be written directly without having to copy data to another * the start can be written directly without having to copy data to another
* buffer etc. * buffer etc.
*/ */
- (unsigned int) reservedSpaceLength - (NSUInteger) reservedSpaceLength
{ {
return sizeof(GSPortItemHeader) + sizeof(GSPortMsgHeader); return sizeof(GSPortItemHeader) + sizeof(GSPortMsgHeader);
} }
- (BOOL) sendBeforeDate: (NSDate*)when - (BOOL) sendBeforeDate: (NSDate*)when
msgid: (int)msgId msgid: (NSInteger)msgId
components: (NSMutableArray*)components components: (NSMutableArray*)components
from: (NSPort*)receivingPort from: (NSPort*)receivingPort
reserved: (unsigned)length reserved: (NSUInteger)length
{ {
BOOL sent = NO; BOOL sent = NO;
GSTcpHandle *h; GSTcpHandle *h;

View file

@ -521,7 +521,7 @@ static Class NSDataMallocClass;
} }
- (void) decodeArrayOfObjCType: (const char*)type - (void) decodeArrayOfObjCType: (const char*)type
count: (unsigned)expected count: (NSUInteger)expected
at: (void*)buf at: (void*)buf
{ {
unsigned int i; unsigned int i;

View file

@ -291,7 +291,7 @@ static NSNull *null = nil;
* An entity definition has been parsed. * An entity definition has been parsed.
*/ */
- (void) entityDecl: (NSString*)name - (void) entityDecl: (NSString*)name
type: (int)type type: (NSInteger)type
public: (NSString*)publicId public: (NSString*)publicId
system: (NSString*)systemId system: (NSString*)systemId
content: (NSString*)content content: (NSString*)content
@ -300,8 +300,8 @@ static NSNull *null = nil;
- (void) attributeDecl: (NSString*)nameElement - (void) attributeDecl: (NSString*)nameElement
name: (NSString*)name name: (NSString*)name
type: (int)type type: (NSInteger)type
typeDefValue: (int)defType typeDefValue: (NSInteger)defType
defaultValue: (NSString*)value defaultValue: (NSString*)value
{ {
[_delegate parser: _owner [_delegate parser: _owner
@ -312,7 +312,7 @@ static NSNull *null = nil;
} }
- (void) elementDecl: (NSString*)name - (void) elementDecl: (NSString*)name
type: (int)type type: (NSInteger)type
{ {
[_delegate parser: _owner [_delegate parser: _owner
foundElementDeclarationWithName: name foundElementDeclarationWithName: name
@ -373,30 +373,30 @@ static NSNull *null = nil;
[self error: e]; [self error: e];
} }
- (void) warning: (NSString*)e - (void) warning: (NSString*)e
colNumber: (int)colNumber colNumber: (NSInteger)colNumber
lineNumber: (int)lineNumber lineNumber: (NSInteger)lineNumber
{ {
e = [NSString stringWithFormat: @"at line: %d column: %d ... %@", e = [NSString stringWithFormat: @"at line: %d column: %d ... %@",
lineNumber, colNumber, e]; (int)lineNumber, (int)colNumber, e];
[self warning: e]; [self warning: e];
} }
- (void) error: (NSString*)e - (void) error: (NSString*)e
colNumber: (int)colNumber colNumber: (NSInteger)colNumber
lineNumber: (int)lineNumber lineNumber: (NSInteger)lineNumber
{ {
e = [NSString stringWithFormat: @"at line: %d column: %d ... %@", e = [NSString stringWithFormat: @"at line: %d column: %d ... %@",
lineNumber, colNumber, e]; (int)lineNumber, (int)colNumber, e];
[self error: e]; [self error: e];
} }
- (void) fatalError: (NSString*)e - (void) fatalError: (NSString*)e
colNumber: (int)colNumber colNumber: (NSInteger)colNumber
lineNumber: (int)lineNumber lineNumber: (NSInteger)lineNumber
{ {
e = [NSString stringWithFormat: @"at line: %d column: %d ... %@", e = [NSString stringWithFormat: @"at line: %d column: %d ... %@",
lineNumber, colNumber, e]; (int)lineNumber, (int)colNumber, e];
[self fatalError: e]; [self fatalError: e];
} }
- (int) hasInternalSubset - (NSInteger) hasInternalSubset
{ {
return 0; return 0;
} }
@ -406,7 +406,7 @@ static NSNull *null = nil;
{ {
return NO; return NO;
} }
- (int) hasExternalSubset - (NSInteger) hasExternalSubset
{ {
return 0; return 0;
} }