mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
Make -base compile almost without warnings again. Fixes:
- Using the correct format specifier - Remove substringFromRange: (GNUstep extension) from NSString.h and use the non-deprecated version in -base. - Delete definitions of methods that are the same in both a class and a category on that class (NSArray and NSObject). Two files still have warnings: - The GNUTLS stuff is using a load of deprecated APIs. - xmlparse.m replaces a method using a category. This method seems to always return nil. Not sure what it's meant to do, or why it isn't a delegate of some kind. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33756 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
ca12a84e3f
commit
4cdea64975
19 changed files with 51 additions and 114 deletions
|
@ -3787,7 +3787,7 @@ appendString(NSMutableData *m, NSUInteger offset, NSUInteger fold,
|
|||
}
|
||||
if (offset > fold)
|
||||
{
|
||||
NSLog(@"Name '%@' too long for folding at %u in header", n, fold);
|
||||
NSLog(@"Name '%@' too long for folding at %" PRIuPTR " in header", n, fold);
|
||||
}
|
||||
|
||||
offset = appendBytes(md, offset, fold, ":", 1);
|
||||
|
|
|
@ -29,55 +29,6 @@
|
|||
|
||||
@implementation NSArray (GNUstepBase)
|
||||
|
||||
/**
|
||||
* Initialize the receiver with the contents of array.
|
||||
* The order of array is preserved.<br />
|
||||
* If shouldCopy is YES then the objects are copied
|
||||
* rather than simply retained.<br />
|
||||
* Invokes -initWithObjects:count:
|
||||
*/
|
||||
- (id) initWithArray: (NSArray*)array copyItems: (BOOL)shouldCopy
|
||||
{
|
||||
NSUInteger c = [array count];
|
||||
GS_BEGINIDBUF(objects, c);
|
||||
|
||||
if ([array isProxy])
|
||||
{
|
||||
NSUInteger i;
|
||||
|
||||
for (i = 0; i < c; i++)
|
||||
{
|
||||
objects[i] = [array objectAtIndex: i];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
[array getObjects: objects];
|
||||
}
|
||||
if (shouldCopy == YES)
|
||||
{
|
||||
NSUInteger i;
|
||||
|
||||
for (i = 0; i < c; i++)
|
||||
{
|
||||
objects[i] = [objects[i] copy];
|
||||
}
|
||||
self = [self initWithObjects: objects count: c];
|
||||
#if GS_WITH_GC == 0
|
||||
while (i > 0)
|
||||
{
|
||||
[objects[--i] release];
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
self = [self initWithObjects: objects count: c];
|
||||
}
|
||||
GS_ENDIDBUF();
|
||||
return self;
|
||||
}
|
||||
|
||||
- (NSUInteger) insertionPosition: (id)item
|
||||
usingFunction: (NSComparisonResult (*)(id, id, void *))sorter
|
||||
context: (void *)context
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue