mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-20 20:26:42 +00:00
Updates for 10.5 API changes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27962 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
845a701069
commit
24d43481a8
138 changed files with 2094 additions and 1536 deletions
|
@ -80,14 +80,14 @@ static Class gcClass = 0;
|
|||
return result;
|
||||
}
|
||||
|
||||
- (unsigned int) count
|
||||
- (NSUInteger) count
|
||||
{
|
||||
return _count;
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
unsigned int c = _count;
|
||||
NSUInteger c = _count;
|
||||
|
||||
[GCObject gcObjectWillBeDeallocated: (GCObject*)self];
|
||||
if ([GCObject gcIsCollecting])
|
||||
|
@ -114,7 +114,7 @@ static Class gcClass = 0;
|
|||
|
||||
- (void) gcDecrementRefCountOfContainedObjects
|
||||
{
|
||||
unsigned int c = _count;
|
||||
NSUInteger c = _count;
|
||||
|
||||
gc.flags.visited = 0;
|
||||
while (c-- > 0)
|
||||
|
@ -134,7 +134,7 @@ static Class gcClass = 0;
|
|||
}
|
||||
else
|
||||
{
|
||||
unsigned int c = _count;
|
||||
NSUInteger c = _count;
|
||||
|
||||
gc.flags.visited = 1;
|
||||
while (c-- > 0)
|
||||
|
@ -149,7 +149,7 @@ static Class gcClass = 0;
|
|||
}
|
||||
}
|
||||
|
||||
- (id) initWithObjects: (id*)objects count: (unsigned int)count
|
||||
- (id) initWithObjects: (id*)objects count: (NSUInteger)count
|
||||
{
|
||||
_contents = NSZoneMalloc([self zone], count * (sizeof(id) + sizeof(BOOL)));
|
||||
_isGCObject = (BOOL*)&_contents[count];
|
||||
|
@ -174,7 +174,7 @@ static Class gcClass = 0;
|
|||
|
||||
- (id) initWithArray: (NSArray*)anotherArray
|
||||
{
|
||||
unsigned int count = [anotherArray count];
|
||||
NSUInteger count = [anotherArray count];
|
||||
|
||||
_contents = NSZoneMalloc([self zone], count * (sizeof(id) + sizeof(BOOL)));
|
||||
_isGCObject = (BOOL*)&_contents[count];
|
||||
|
@ -208,7 +208,7 @@ static Class gcClass = 0;
|
|||
return [[GCMutableArray allocWithZone: zone] initWithArray: self];
|
||||
}
|
||||
|
||||
- (id) objectAtIndex: (unsigned int)index
|
||||
- (id) objectAtIndex: (NSUInteger)index
|
||||
{
|
||||
if (index >= _count)
|
||||
{
|
||||
|
@ -272,7 +272,7 @@ static Class gcClass = 0;
|
|||
|
||||
- (id) initWithArray: (NSArray*)anotherArray
|
||||
{
|
||||
unsigned int count = [anotherArray count];
|
||||
NSUInteger count = [anotherArray count];
|
||||
|
||||
self = [self initWithCapacity: count];
|
||||
if (self != nil)
|
||||
|
@ -287,7 +287,7 @@ static Class gcClass = 0;
|
|||
return self;
|
||||
}
|
||||
|
||||
- (id) initWithCapacity: (unsigned int)aNumItems
|
||||
- (id) initWithCapacity: (NSUInteger)aNumItems
|
||||
{
|
||||
if (aNumItems < 1)
|
||||
{
|
||||
|
@ -301,7 +301,7 @@ static Class gcClass = 0;
|
|||
return self;
|
||||
}
|
||||
|
||||
- (id) initWithObjects: (id *)objects count: (unsigned int)count
|
||||
- (id) initWithObjects: (id *)objects count: (NSUInteger)count
|
||||
{
|
||||
self = [self initWithCapacity: count];
|
||||
if (self != nil)
|
||||
|
@ -325,9 +325,9 @@ static Class gcClass = 0;
|
|||
return self;
|
||||
}
|
||||
|
||||
- (void) insertObject: (id)anObject atIndex: (unsigned int)index
|
||||
- (void) insertObject: (id)anObject atIndex: (NSUInteger)index
|
||||
{
|
||||
unsigned int i;
|
||||
NSUInteger i;
|
||||
|
||||
if (anObject == nil)
|
||||
{
|
||||
|
@ -381,14 +381,14 @@ static Class gcClass = 0;
|
|||
[self removeObjectsInRange: NSMakeRange(0, _count)];
|
||||
}
|
||||
|
||||
- (void) removeObjectAtIndex: (unsigned int)index
|
||||
- (void) removeObjectAtIndex: (NSUInteger)index
|
||||
{
|
||||
[self removeObjectsInRange: NSMakeRange(index, 1)];
|
||||
}
|
||||
|
||||
- (void) removeObjectsInRange: (NSRange)range
|
||||
{
|
||||
unsigned int i;
|
||||
NSUInteger i;
|
||||
|
||||
if (NSMaxRange(range) > _count)
|
||||
{
|
||||
|
@ -413,7 +413,7 @@ static Class gcClass = 0;
|
|||
_count -= range.length;
|
||||
}
|
||||
|
||||
- (void) replaceObjectAtIndex: (unsigned int)index withObject: (id)anObject
|
||||
- (void) replaceObjectAtIndex: (NSUInteger)index withObject: (id)anObject
|
||||
{
|
||||
if (anObject == nil)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue