mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
minor fixes for 64bit systems using collection with more than 2^32 items
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@38295 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
13e4d77cec
commit
60a0f7ce5b
6 changed files with 16 additions and 16 deletions
|
@ -84,8 +84,8 @@ static Class GSInlineArrayClass;
|
||||||
NSString *reason;
|
NSString *reason;
|
||||||
|
|
||||||
info = [NSDictionary dictionaryWithObjectsAndKeys:
|
info = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||||
[NSNumber numberWithUnsignedInt: index], @"Index",
|
[NSNumber numberWithUnsignedInteger: index], @"Index",
|
||||||
[NSNumber numberWithUnsignedInt: _count], @"Count",
|
[NSNumber numberWithUnsignedInteger: _count], @"Count",
|
||||||
self, @"Array", nil, nil];
|
self, @"Array", nil, nil];
|
||||||
|
|
||||||
reason = [NSString stringWithFormat:
|
reason = [NSString stringWithFormat:
|
||||||
|
@ -591,7 +591,7 @@ static Class GSInlineArrayClass;
|
||||||
NSDictionary *info;
|
NSDictionary *info;
|
||||||
|
|
||||||
info = [NSDictionary dictionaryWithObjectsAndKeys:
|
info = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||||
[NSNumber numberWithUnsignedInt: index], @"Index",
|
[NSNumber numberWithUnsignedInteger: index], @"Index",
|
||||||
self, @"Array", nil, nil];
|
self, @"Array", nil, nil];
|
||||||
|
|
||||||
exception = [NSException exceptionWithName: NSInvalidArgumentException
|
exception = [NSException exceptionWithName: NSInvalidArgumentException
|
||||||
|
@ -772,7 +772,7 @@ static Class GSInlineArrayClass;
|
||||||
NSDictionary *info;
|
NSDictionary *info;
|
||||||
|
|
||||||
info = [NSDictionary dictionaryWithObjectsAndKeys:
|
info = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||||
[NSNumber numberWithUnsignedInt: index], @"Index",
|
[NSNumber numberWithUnsignedInteger: index], @"Index",
|
||||||
_contents_array[index], @"OldObject",
|
_contents_array[index], @"OldObject",
|
||||||
self, @"Array", nil, nil];
|
self, @"Array", nil, nil];
|
||||||
|
|
||||||
|
|
|
@ -1463,13 +1463,13 @@ compare(id elem1, id elem2, void* context)
|
||||||
|
|
||||||
if ([key isEqualToString: @"@count"] == YES)
|
if ([key isEqualToString: @"@count"] == YES)
|
||||||
{
|
{
|
||||||
result = [NSNumber numberWithUnsignedInt: [self count]];
|
result = [NSNumber numberWithUnsignedInteger: [self count]];
|
||||||
}
|
}
|
||||||
else if ([key isEqualToString: @"count"] == YES)
|
else if ([key isEqualToString: @"count"] == YES)
|
||||||
{
|
{
|
||||||
GSOnceMLog(
|
GSOnceMLog(
|
||||||
@"[NSArray-valueForKey:] called wth 'count' is deprecated .. use '@count'");
|
@"[NSArray-valueForKey:] called wth 'count' is deprecated .. use '@count'");
|
||||||
result = [NSNumber numberWithUnsignedInt: [self count]];
|
result = [NSNumber numberWithUnsignedInteger: [self count]];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1517,7 +1517,7 @@ compare(id elem1, id elem2, void* context)
|
||||||
{
|
{
|
||||||
if ([path isEqualToString: @"@count"] == YES)
|
if ([path isEqualToString: @"@count"] == YES)
|
||||||
{
|
{
|
||||||
result = [NSNumber numberWithUnsignedInt: [self count]];
|
result = [NSNumber numberWithUnsignedInteger: [self count]];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1532,7 +1532,7 @@ compare(id elem1, id elem2, void* context)
|
||||||
|
|
||||||
if ([op isEqualToString: @"@count"] == YES)
|
if ([op isEqualToString: @"@count"] == YES)
|
||||||
{
|
{
|
||||||
result = [NSNumber numberWithUnsignedInt: count];
|
result = [NSNumber numberWithUnsignedInteger: count];
|
||||||
}
|
}
|
||||||
else if ([op isEqualToString: @"@avg"] == YES)
|
else if ([op isEqualToString: @"@avg"] == YES)
|
||||||
{
|
{
|
||||||
|
|
|
@ -752,12 +752,12 @@ static NSDictionary *makeReference(unsigned ref)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case _C_INT:
|
case _C_INT:
|
||||||
o = [NSNumber numberWithInt: *(NSInteger*)address];
|
o = [NSNumber numberWithInt: *(int*)address];
|
||||||
[_enc setObject: o forKey: aKey];
|
[_enc setObject: o forKey: aKey];
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case _C_UINT:
|
case _C_UINT:
|
||||||
o = [NSNumber numberWithUnsignedInt: *(NSUInteger*)address];
|
o = [NSNumber numberWithUnsignedInt: *(unsigned int*)address];
|
||||||
[_enc setObject: o forKey: aKey];
|
[_enc setObject: o forKey: aKey];
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -229,8 +229,8 @@ static Class concreteClass = Nil;
|
||||||
NSString *reason;
|
NSString *reason;
|
||||||
|
|
||||||
info = [NSDictionary dictionaryWithObjectsAndKeys:
|
info = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||||
[NSNumber numberWithUnsignedInt: index], @"Index",
|
[NSNumber numberWithUnsignedInteger: index], @"Index",
|
||||||
[NSNumber numberWithUnsignedInt: _count], @"Count",
|
[NSNumber numberWithUnsignedInteger: _count], @"Count",
|
||||||
self, @"Array", nil, nil];
|
self, @"Array", nil, nil];
|
||||||
|
|
||||||
reason = [NSString stringWithFormat:
|
reason = [NSString stringWithFormat:
|
||||||
|
|
|
@ -213,7 +213,7 @@ extern void GSPropertyListMake(id,NSDictionary*,BOOL,BOOL,unsigned,id*);
|
||||||
case 'i':
|
case 'i':
|
||||||
ptr++;
|
ptr++;
|
||||||
[arr addObject: [NSNumber numberWithInt:
|
[arr addObject: [NSNumber numberWithInt:
|
||||||
va_arg(args, NSInteger)]];
|
va_arg(args, int)]];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'o':
|
case 'o':
|
||||||
|
@ -224,7 +224,7 @@ extern void GSPropertyListMake(id,NSDictionary*,BOOL,BOOL,unsigned,id*);
|
||||||
case 'X':
|
case 'X':
|
||||||
ptr++;
|
ptr++;
|
||||||
[arr addObject: [NSNumber numberWithUnsignedInt:
|
[arr addObject: [NSNumber numberWithUnsignedInt:
|
||||||
va_arg(args, NSUInteger)]];
|
va_arg(args, unsigned)]];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'e':
|
case 'e':
|
||||||
|
|
|
@ -656,7 +656,7 @@ static Class NSMutableSet_concrete_class;
|
||||||
{
|
{
|
||||||
if ([path isEqualToString: @"@count"] == YES)
|
if ([path isEqualToString: @"@count"] == YES)
|
||||||
{
|
{
|
||||||
result = [NSNumber numberWithUnsignedInt: [self count]];
|
result = [NSNumber numberWithUnsignedInteger: [self count]];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -671,7 +671,7 @@ static Class NSMutableSet_concrete_class;
|
||||||
|
|
||||||
if ([op isEqualToString: @"@count"] == YES)
|
if ([op isEqualToString: @"@count"] == YES)
|
||||||
{
|
{
|
||||||
result = [NSNumber numberWithUnsignedInt: count];
|
result = [NSNumber numberWithUnsignedInteger: count];
|
||||||
}
|
}
|
||||||
else if ([op isEqualToString: @"@avg"] == YES)
|
else if ([op isEqualToString: @"@avg"] == YES)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue