Lots of little fixes to make -base compile with -Werror (now builds without warnings).

Richard: I'm unsure about three of these, which were fixes in memset() calls in:
- NSConcreteMapTable.m
- NSConcreteHashTable.m
- Additions/NSData+GNUstepBase.m

Please can you check them?  I think they are intended to zero the entire object
(rather than the first word), but the lack of comments makes me unsure.

Most changes were just tweaks to variable types.  I've also removed some dead code from NSInvocation.  This was small group of things that were marked for internal use only, but not actually referenced in the code anywhere.

Other improvements:

- NSArray / NSDictionary fixed up to use the 10.7 (ARC-friendly) prototypes.
- getObjects:andKeys: implemented for NSDictionary (10.5 method)
- NSPointerArray and NSHashTable now properly support weak objects.
- Tests for weak objects in collections.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33621 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
David Chisnall 2011-07-24 13:09:22 +00:00
parent f2a54242a7
commit d2ea054c26
39 changed files with 196 additions and 155 deletions

View file

@ -2389,7 +2389,7 @@ failure:
+ (id) dataWithShmID: (int)anID length: (NSUInteger)length
{
#ifdef HAVE_SHMCTL
NSDataShared *d;
NSMutableDataShared *d;
d = [NSMutableDataShared allocWithZone: NSDefaultMallocZone()];
d = [d initWithShmID: anID length: length];
@ -2502,7 +2502,7 @@ failure:
+ (id) allocWithZone: (NSZone*)z
{
return (NSData*)NSAllocateObject(self, 0, z);
return NSAllocateObject(self, 0, z);
}
/* Creation and Destruction of objects. */
@ -2979,7 +2979,7 @@ getBytes(void* dst, void* src, unsigned len, unsigned limit, unsigned *pos)
@implementation NSDataMappedFile
+ (id) allocWithZone: (NSZone*)z
{
return (NSData*)NSAllocateObject([NSDataMappedFile class], 0, z);
return NSAllocateObject([NSDataMappedFile class], 0, z);
}
- (void) dealloc
@ -3070,7 +3070,7 @@ getBytes(void* dst, void* src, unsigned len, unsigned limit, unsigned *pos)
@implementation NSDataShared
+ (id) allocWithZone: (NSZone*)z
{
return (NSData*)NSAllocateObject([NSDataShared class], 0, z);
return NSAllocateObject([NSDataShared class], 0, z);
}
- (void) dealloc
@ -3184,7 +3184,7 @@ getBytes(void* dst, void* src, unsigned len, unsigned limit, unsigned *pos)
+ (id) allocWithZone: (NSZone*)z
{
return (NSData*)NSAllocateObject(mutableDataMalloc, 0, z);
return NSAllocateObject(mutableDataMalloc, 0, z);
}
- (Class) classForCoder
@ -3797,7 +3797,7 @@ getBytes(void* dst, void* src, unsigned len, unsigned limit, unsigned *pos)
@implementation NSMutableDataShared
+ (id) allocWithZone: (NSZone*)z
{
return (NSData*)NSAllocateObject([NSMutableDataShared class], 0, z);
return NSAllocateObject([NSMutableDataShared class], 0, z);
}
- (void) dealloc