new lightweight generics implemenation. (Newer MacOS X/iOS code assuming
the presence of the generics annotations can otherwise not be compiled with
GNUstep). This should be well-behaved under clang and gcc both.
Fix NSCache which was copying the cache keys when it really shouldn't
have. Added a few test cases for eviction behaviour.
Few smaller tweaks to avoid compiler warnings.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39406 72102866-910b-0410-8b05-ffd578937521
interface that can be used for all sorting tasks in the library. The actual sort
algorithms to use are now plugable. Timsort is the new default sorting
algorithm, the existing algorithms, shellsort and quicksort, can still be
selected using a configure switch.
Also implement the new NSComparator (blocks) based sorting and insertion index
searching methods for NSMutableArray and NSArray.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@35573 72102866-910b-0410-8b05-ffd578937521
Yes, the syntax is ugly, but no doubt people will start using it in June...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@35033 72102866-910b-0410-8b05-ffd578937521
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
Added declaration of __bridge for use in non-ARC mode.
Tweaked arrayWithObjects:count: to take a const id* parameter, to avoid ARC
treating it as a write-back parameter.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33425 72102866-910b-0410-8b05-ffd578937521
Some of these implementations are not as efficient as they could be (especially the ones that take an NSIndexSet as the first argument). They also don't yet support concurrent enumeration. Apple implements these using Grand Central. We could possibly have a background thread that we send these things to (or use GCD if libdispatch is available). It's not worth spawning a new thread for them, except in exceptional circumstances (and, unfortunately, we can't easily tell how expensive a single iteration of a block is. Possibly we could time one block invocation, and if it's longer than some threshold make it concurrent, but it's probably not worth the effort).
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29176 72102866-910b-0410-8b05-ffd578937521
* Headers/Foundation/NSArray.h/.m: added -setValue:forKey:
and -valueForKey: to comply to Mac OS X v10.3 and
later documentation.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@18322 72102866-910b-0410-8b05-ffd578937521