Commit graph

174 commits

Author SHA1 Message Date
rfm
77c66e3d95 Fix leaks 2024-11-15 20:48:09 +00:00
rfm
6667842dd5 Update FSF address as requested by Gregory 2024-11-07 13:37:59 +00:00
rfm
4233f6a9d6 fix dead assignments 2024-06-21 15:02:55 +01:00
rfm
40ebe6df30 Minore documentation cross reference fixes 2023-10-30 19:55:45 +00:00
Levin Li
5b151c5fa0 Do not call handler blocks if they are nil 2021-11-23 18:34:34 +08:00
Richard Frith-Macdonald
e7035cadf3 Be defensive about checking for key beginning with @ 2020-11-18 09:09:48 +00:00
Richard Frith-Macdonald
2e07244f8e Updates to move towards ARC 2020-02-08 16:42:17 +00:00
Gregory John Casamento
753c907938 Fix address for FSF and License name in all headers in base 2019-12-09 18:36:00 -05:00
Frederik Seiffert
561cef3797 Perform non-concurrent block enumeration in place.
Was previously using serial queue, which doesn't match Apple platforms.
2019-10-23 17:44:53 +02:00
Frederik Seiffert
0547c53861 Fixed mutable dictionary keyed subscript behavior.
Assigning nil value via keyed subscript now correctly removes object for key.
2019-10-02 11:38:30 +02:00
Richard Frith-Macdonald
e8354c57f0 Fixed memory leak. Tidied up to match coding style. 2019-09-26 12:45:25 +01:00
Patryk Laurent
c8030ce0cb call count instead of length 2019-09-03 23:19:27 -07:00
Patryk Laurent
425ffdb02c remove nonsensical import 2019-09-03 22:33:38 -07:00
Patryk Laurent
c692d5e5ca Solution for keysSortedByValueUsingComparator: incl multiple keys with same value 2019-09-03 22:31:13 -07:00
Gregory John Casamento
688d409c4b Merge branch 'master' of github.com:gnustep/libs-base into add_nsorderedset_classcluster 2019-06-28 20:14:56 -04:00
Richard Frith-Macdonald
3f7d54a33f improve reportingn of memory usage 2019-06-11 14:07:10 +01:00
Gregory John Casamento
966c31f43d Fix a number of comments by Fred 2019-06-10 10:20:26 -04:00
Gregory John Casamento
d59a90206a Finish NSDIctionary changes 2019-06-08 09:53:39 -04:00
Gregory John Casamento
5287a62909 Add skeletal implementation of keysSortyedByValue*** methods 2019-05-20 22:23:20 -04:00
Richard Frith-MacDonald
7c9d7acafa Update NSComparisonResult to use NS_ENUM
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@40418 72102866-910b-0410-8b05-ffd578937521
2017-03-27 09:00:35 +00:00
Niels Grewe
ad428b99d5 Fix -getObjects:andKeys:
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@40036 72102866-910b-0410-8b05-ffd578937521
2016-07-26 23:24:56 +00:00
Richard Frith-MacDonald
d40d219015 removal of garbage collection
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39608 72102866-910b-0410-8b05-ffd578937521
2016-03-25 11:15:28 +00:00
Niels Grewe
28c824a78a Modify the interfaces of all collection classes to be compatible with the
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
2016-02-22 21:04:18 +00:00
Richard Frith-MacDonald
5cbc47a238 minor performance tweaks
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@38805 72102866-910b-0410-8b05-ffd578937521
2015-07-16 09:30:57 +00:00
Richard Frith-MacDonald
3b02814665 more updates
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@38803 72102866-910b-0410-8b05-ffd578937521
2015-07-16 08:44:15 +00:00
Richard Frith-MacDonald
841ddf78e0 memory usage interrogation
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@38799 72102866-910b-0410-8b05-ffd578937521
2015-07-15 14:14:21 +00:00
Quentin Mathe
52fa3a2c07 Changed keys argument type to (const id <NSCopying>[]) in
-[NSDictionary initWithObjects:forKeys:count:] and 
+dictionaryWithObjects:forKeys:count:, to follow the current Cocoa API.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@37431 72102866-910b-0410-8b05-ffd578937521
2013-12-05 13:16:36 +00:00
Richard Frith-MacDonald
ed09c55959 leak detection improvements
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@37003 72102866-910b-0410-8b05-ffd578937521
2013-08-22 15:44:54 +00:00
Richard Frith-MacDonald
119c9a28c2 tweak enumerator return
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@36531 72102866-910b-0410-8b05-ffd578937521
2013-04-14 17:50:00 +00:00
Richard Frith-MacDonald
55149fdc40 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
David Chisnall
3cb1b08b26 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
Niels Grewe
fa47f6da10 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
Richard Frith-MacDonald
c86e143298 tidy a little
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34981 72102866-910b-0410-8b05-ffd578937521
2012-03-22 20:58:27 +00:00
Niels Grewe
c6df5dc455 Implement a few blocks related enumeration methods on NSDictionary (with
unit tests).


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34965 72102866-910b-0410-8b05-ffd578937521
2012-03-20 20:17:45 +00:00
Fred Kiefer
d3a9215d05 Imporve keyed decoding.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34049 72102866-910b-0410-8b05-ffd578937521
2011-10-24 14:33:30 +00:00
David Chisnall
d2ea054c26 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
Richard Frith-MacDonald
59d4be1265 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
Richard Frith-MacDonald
7cc69dfaae 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
Richard Frith-MacDonald
c8a6832349 cosmetic tweaks
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29657 72102866-910b-0410-8b05-ffd578937521
2010-02-17 11:47:06 +00:00
Richard Frith-MacDonald
21d597e740 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
David Chisnall
9e003700b4 Added fast enumeration support to GS[Mutable]Dictionary. This follows exactly the same pattern (and uses the same code as) GSSet. It's probably worth factoring out this code, because it is now used in four methods with almost no variation between them.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29180 72102866-910b-0410-8b05-ffd578937521
2009-12-29 16:21:01 +00:00
Richard Frith-MacDonald
9faaf05aff 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
Richard Frith-MacDonald
24d43481a8 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
Richard Frith-MacDonald
b313d1b576 Obscure thread-safety fixes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27209 72102866-910b-0410-8b05-ffd578937521
2008-12-04 18:04:00 +00:00
Richard Frith-MacDonald
98a1c9f463 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
Richard Frith-MacDonald
b2b14398d2 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
Nicola Pero
ce6e171204 Improved documentation on a couple of NSDictionary methods
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@26303 72102866-910b-0410-8b05-ffd578937521
2008-03-14 17:13:41 +00:00
Richard Frith-MacDonald
d6cfc0e91c 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
Richard Frith-MacDonald
62559023b9 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
Richard Frith-MacDonald
2bc3d71591 Fix documentatiion errors.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@24897 72102866-910b-0410-8b05-ffd578937521
2007-03-19 10:42:16 +00:00