Commit graph

202 commits

Author SHA1 Message Date
rfm
0138c51065 Memory management nad documentation fixes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@35584 72102866-910b-0410-8b05-ffd578937521
2012-09-21 10:27:05 +00:00
rfm
8ec0deff44 formatting/coding style fixups
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@35574 72102866-910b-0410-8b05-ffd578937521
2012-09-19 14:20:01 +00:00
thebeing
b9b63476ef Completely overhaul how we do sorting in -base. GSSorting.h now defines an
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
2012-09-19 13:31:09 +00:00
theraven
ecfd46edb2 Support for collection subscripting (NSArray and NSDictionary).
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
2012-04-06 12:23:10 +00:00
thebeing
a5c6cfa9f7 Detect the presence of libdispatch and, if available, use it for collection
enumeration methods that take blocks as arguments. This allows us to implement
the NSEnumerationConcurrent option of those methods with minimal effort.

The searching methods on NSIndexSet and all the sorting methods are still
missing.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@35010 72102866-910b-0410-8b05-ffd578937521
2012-03-27 17:05:19 +00:00
fredkiefer
eaed3df26b * Source/NSArray.m (-objectsAtIndexes:): Fix comparision of
unsigned variable with NSNotFound.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34389 72102866-910b-0410-8b05-ffd578937521
2012-01-02 15:07:32 +00:00
theraven
ceba92a265 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
2011-07-24 13:09:22 +00:00
theraven
b5b216f2be Change id* -> id[] for OS X 10.7 compatibility in NSArray. This change is required for ARC: now, id* means pointer to a single object, id[] means array.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33607 72102866-910b-0410-8b05-ffd578937521
2011-07-22 16:07:23 +00:00
rfm
e78ceb4c96 more leak cleanup stuff
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33349 72102866-910b-0410-8b05-ffd578937521
2011-06-19 13:34:17 +00:00
rfm
c0674078c9 OSX compat tweaks
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32323 72102866-910b-0410-8b05-ffd578937521
2011-02-23 11:52:17 +00:00
theraven
703e5bf39a Remove redundant copy + leak in NSArray.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32080 72102866-910b-0410-8b05-ffd578937521
2011-02-11 15:13:48 +00:00
rfm
feb65c9c78 Recommit tested changes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32075 72102866-910b-0410-8b05-ffd578937521
2011-02-11 14:31:25 +00:00
rfm
e679d4e99e Revert back to working code!
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32072 72102866-910b-0410-8b05-ffd578937521
2011-02-11 13:53:54 +00:00
rfm
b21d800c2a get things to compile again
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32071 72102866-910b-0410-8b05-ffd578937521
2011-02-11 13:05:48 +00:00
theraven
db37029493 Fix NSEnumerationReverse in the other place where this bug was pasted. I must have been asleep or drunk when I wrote this method.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32055 72102866-910b-0410-8b05-ffd578937521
2011-02-11 11:31:41 +00:00
theraven
810000e008 Fix [NSArray -indexesOfObjectsWithOptions:passingTest:] with NSEnumerationReverse option. Was doing forward iteration in all cases.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32054 72102866-910b-0410-8b05-ffd578937521
2011-02-11 11:29:34 +00:00
rfm
53e8554a8c tweaks for clang static analyser warningS
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32048 72102866-910b-0410-8b05-ffd578937521
2011-02-11 09:02:33 +00:00
rfm
ef07c63434 various bugfixes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30732 72102866-910b-0410-8b05-ffd578937521
2010-06-15 11:26:00 +00:00
rfm
5ee8f8d24c revert reversion ... i was wrong about jigs
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30150 72102866-910b-0410-8b05-ffd578937521
2010-04-14 10:39:05 +00:00
rfm
208d639ba5 revert change which broke jigs
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30147 72102866-910b-0410-8b05-ffd578937521
2010-04-14 09:18:12 +00:00
rfm
15b7f327ae osx compatibility tweak.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30140 72102866-910b-0410-8b05-ffd578937521
2010-04-13 18:37:09 +00:00
rfm
e263f96f16 more header reorganisation
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29731 72102866-910b-0410-8b05-ffd578937521
2010-02-25 08:36:34 +00:00
rfm
d605c6f7b5 Simplify header inclusion
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29669 72102866-910b-0410-8b05-ffd578937521
2010-02-19 08:12:46 +00:00
rfm
f13d56d8ec merge back reorganisation branch
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29615 72102866-910b-0410-8b05-ffd578937521
2010-02-14 10:48:10 +00:00
theraven
c5cf5e4535 Added implementations of some of the new (10.6) NSArray methods that take blocks as arguments. These all use the new GSBlocks.h macros, so compile cleanly with GCC, but can be used by code compiled by clang.
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
2009-12-27 16:49:52 +00:00
theraven
23b31db6b3 Added -enumerateObjectsUsingBlock: implementation to NSArray.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29174 72102866-910b-0410-8b05-ffd578937521
2009-12-27 15:25:12 +00:00
rfm
d9e6e84591 Remove obsolete ifdefs
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28262 72102866-910b-0410-8b05-ffd578937521
2009-04-28 20:00:59 +00:00
rfm
4bb86f10be gc improvements
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28234 72102866-910b-0410-8b05-ffd578937521
2009-04-19 10:03:18 +00:00
rfm
5130133dbf OSX 10.5 API fixups for mingw
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28092 72102866-910b-0410-8b05-ffd578937521
2009-03-18 10:02:49 +00:00
rfm
30cf8bf35b 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
2009-02-23 20:42:32 +00:00
rfm
a2e18e58d5 Add skeletal NSXML work as requested.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27824 72102866-910b-0410-8b05-ffd578937521
2009-02-09 16:16:11 +00:00
rfm
0913c7cb95 More garbage collection updates/fixes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27590 72102866-910b-0410-8b05-ffd578937521
2009-01-13 15:57:38 +00:00
rfm
d304d9ee34 garbage collection fixups
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27578 72102866-910b-0410-8b05-ffd578937521
2009-01-12 12:48:46 +00:00
rfm
8658db87db Applied patch #6677
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27080 72102866-910b-0410-8b05-ffd578937521
2008-11-17 13:45:32 +00:00
rfm
d790d9747f Fixups for DO compatibility.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@26747 72102866-910b-0410-8b05-ffd578937521
2008-07-06 09:18:30 +00:00
rfm
e0711a3b8d allow developers more time to adapt to LGPLv3
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@26606 72102866-910b-0410-8b05-ffd578937521
2008-06-08 10:38:33 +00:00
rfm
f1d83b9f14 MacOS-X compatibility updates.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@26598 72102866-910b-0410-8b05-ffd578937521
2008-06-06 13:57:06 +00:00
rfm
7a252286dc Fix missing @count support
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@26311 72102866-910b-0410-8b05-ffd578937521
2008-03-16 07:22:08 +00:00
rfm
189eddfee0 Fix recursion error
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@26310 72102866-910b-0410-8b05-ffd578937521
2008-03-16 07:06:15 +00:00
rfm
bf72375a70 Add KVC aggregate operators
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@26309 72102866-910b-0410-8b05-ffd578937521
2008-03-16 06:56:52 +00:00
rfm
3aa7189ddb Improve MacOS-X compatibility of headers.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@25638 72102866-910b-0410-8b05-ffd578937521
2007-11-29 20:53:26 +00:00
rfm
cd46236028 Update to GPL3 and LGPL3
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@25482 72102866-910b-0410-8b05-ffd578937521
2007-09-14 11:36:11 +00:00
rfm
89a0cb9080 Varous tidyups
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@25330 72102866-910b-0410-8b05-ffd578937521
2007-07-14 04:34:00 +00:00
nicola
350af41dcc Review of KVC and improvements by Chris Farber
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@25313 72102866-910b-0410-8b05-ffd578937521
2007-07-10 17:16:31 +00:00
rfm
595be905a3 hash tidyups and rewrite of array sorting for better performance.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@23967 72102866-910b-0410-8b05-ffd578937521
2006-10-26 08:33:40 +00:00
rfm
9e7b96ab0e More code tidyups and NSError updates.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@23921 72102866-910b-0410-8b05-ffd578937521
2006-10-20 10:56:27 +00:00
rfm
799955caff Experiment with function visibility ... try caching locale dictionary to be
accessed from a function yet invisible outside the base library even when
caching is done in the Additions subproject.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@23903 72102866-910b-0410-8b05-ffd578937521
2006-10-18 15:36:52 +00:00
rfm
1cc4c5712a Slim down gloabl symbols a little.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@23803 72102866-910b-0410-8b05-ffd578937521
2006-10-09 17:21:51 +00:00
rfm
31342aef09 Updates to reduce global namespace pollution. Plenty more remaining.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@23795 72102866-910b-0410-8b05-ffd578937521
2006-10-09 14:00:01 +00:00
rfm
f2398378e0 Some cleanup in preparation for next release.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@22618 72102866-910b-0410-8b05-ffd578937521
2006-03-08 11:28:59 +00:00