Commit graph

51 commits

Author SHA1 Message Date
rfm
28ba7788ce Fix the case where we replace a value already in the map 2024-11-12 14:27:06 +00:00
rfm
b78b2e2030 hash/map table and pointer functions fixups 2024-11-12 12:03:24 +00:00
rfm
c981920679 Revert "Retain count fixes"
This reverts commit 544dcce482.
2024-11-10 20:13:39 +00:00
rfm
544dcce482 Retain count fixes 2024-11-10 14:14:42 +00:00
rfm
6667842dd5 Update FSF address as requested by Gregory 2024-11-07 13:37:59 +00:00
rfm
52c127c950 GC was deprecated several releases ago and notinally removed a couple of releases ago ... delete more remnants of the old code. 2024-07-22 15:14:13 +01:00
rfm
c435c6d7d6 Remove/update confusing comments. Separate acquire and assign operations for pointer functions. 2024-07-17 15:42:33 +01:00
rfm
2c1a993612 Update hadling of nil args to match OS-X 2024-07-17 11:32:01 +01:00
rfm
4629a4e1f6 Tweaks related to issue #311 2024-07-15 17:19:16 +01:00
Frederik Seiffert
0582eddd96 Export string constants and annotate exported function implementations
Moves scattered string constants to externs.m, and removes obsolete code replacing constant strings.
2021-03-27 17:36:15 +01:00
Richard Frith-Macdonald
6d20773f56 Consistently use __typeof__() rather than typeof() or __typeof() for compatibility (GCC and clang and, perhaps, other future compilers) irrespective of -std= compilation options. 2020-12-15 13:01:00 +00:00
Richard Frith-Macdonald
09e527c0fd Fix to make value pointed to by mutationsPtr be unsigned long. 2020-12-04 11:08:16 -05:00
Frederik Seiffert
71f6cde4bd Fix replacing an existing value in a weak objects map table. 2020-06-05 11:55:33 +02:00
fredkiefer
38a965819e Try to use a mixed form to access weak pointers. 2019-12-15 14:18:00 +01:00
fredkiefer
d1cf30dd9f * Headers/GNUstepBase/GSIMap.h: Use GSI_MAP_NODE_IS_EMPTY macros
when checking in enumerator.
* Source/NSConcreteHashTable.m,
* Source/NSConcreteMapTable.m: Revert part of the weak pointer change.
2019-12-15 13:40:51 +01: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
David Chisnall
6513da4d8c Reorder macros as per @fredkiefer's review comment. 2019-11-25 10:41:07 +00:00
David Chisnall
f957b21972 Rework some of the weak handling for NS{Map,Hash}Table.
The existing code was assuming that weak object pointers were safe to
read directly, without going via the read barrier, which is incorrect.
It was also attempting to retain the result in some places.  The new
code is hopefully somewhat more correct.
2019-11-25 10:40:16 +00:00
Richard Frith-Macdonald
dd36855923 Improved memory usage reporting mechanisms 2019-08-08 17:20:25 +01:00
Richard Frith-Macdonald
3f7d54a33f improve reportingn of memory usage 2019-06-11 14:07:10 +01:00
Richard Frith-MacDonald
27899e4d66 patch by Larry Campbell plus removal of some garbage collection vestiges
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@40008 72102866-910b-0410-8b05-ffd578937521
2016-07-18 10:50:28 +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
Richard Frith-MacDonald
14d22790b6 Another attempt to work with non-fragile abi
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@38838 72102866-910b-0410-8b05-ffd578937521
2015-07-24 19:59:05 +00:00
Richard Frith-MacDonald
d4234288d5 Fix for nonfragile-abi
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@38825 72102866-910b-0410-8b05-ffd578937521
2015-07-22 08:26:30 +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
8e93dc85d3 More experimental code changes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@38801 72102866-910b-0410-8b05-ffd578937521
2015-07-15 15:26:29 +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
6f9ad53449 double retain bugfix
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@36762 72102866-910b-0410-8b05-ffd578937521
2013-06-27 06:42:42 +00:00
David Chisnall
6cdbd621be Replace the implementations of NSFastEnumeration in NSConcrete{Hash,Map}Table with ones that work and don't cause people to dereference pointers that are set to random integer values.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33713 72102866-910b-0410-8b05-ffd578937521
2011-08-09 08:43:54 +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
David Chisnall
bc37adfb0c Add support (and test) for weak keys and values in NSMapTable. This support should work in GC mode. It also works if the runtime supports ARC, even if the compiler does not use this support.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33617 72102866-910b-0410-8b05-ffd578937521
2011-07-23 16:16:01 +00:00
Richard Frith-MacDonald
ba24ce0841 minor map/hash table compatibility tweaks and simplify notification center
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33210 72102866-910b-0410-8b05-ffd578937521
2011-05-31 06:46:17 +00:00
Richard Frith-MacDonald
05e186ac65 fix gc heade rlocation.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32388 72102866-910b-0410-8b05-ffd578937521
2011-02-27 17:53:14 +00:00
Richard Frith-MacDonald
7047f9e6d4 more changes to avoid leak warnings
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32093 72102866-910b-0410-8b05-ffd578937521
2011-02-12 09:00:18 +00:00
David Chisnall
104c14bbf1 Silence some warnings caused by returning the result of a method that doesn't return.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32077 72102866-910b-0410-8b05-ffd578937521
2011-02-11 14:51:47 +00:00
Richard Frith-MacDonald
62939c969a compatibility and portability fixes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29736 72102866-910b-0410-8b05-ffd578937521
2010-02-25 10:00:48 +00:00
Richard Frith-MacDonald
8769dd8b6f deprecates some gnustep runtime wrappers
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29697 72102866-910b-0410-8b05-ffd578937521
2010-02-22 10:13:20 +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
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
Richard Frith-MacDonald
0cbf8db121 Add assertions to trap runtime error
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29263 72102866-910b-0410-8b05-ffd578937521
2010-01-11 13:54:32 +00:00
Richard Frith-MacDonald
e13a513f78 Tidied for consistency
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29262 72102866-910b-0410-8b05-ffd578937521
2010-01-11 12:49:18 +00:00
Fred Kiefer
07b2bd4491 Set the concrete class, when this isn't already set. This was causing
compilation problems on gui with gcc 4.4


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29257 72102866-910b-0410-8b05-ffd578937521
2010-01-11 11:12:02 +00:00
Richard Frith-MacDonald
fcc33c1b71 explicitly specify types in union
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28762 72102866-910b-0410-8b05-ffd578937521
2009-10-02 15:14:42 +00:00
Richard Frith-MacDonald
2e2d640c4d Add comments to avoid confusion.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28390 72102866-910b-0410-8b05-ffd578937521
2009-07-11 14:02:00 +00:00
Richard Frith-MacDonald
4f5344d2c2 minor performance tweak
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28237 72102866-910b-0410-8b05-ffd578937521
2009-04-20 08:18:11 +00:00
Richard Frith-MacDonald
067a687974 zeroing weak key fixes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28236 72102866-910b-0410-8b05-ffd578937521
2009-04-19 13:56:29 +00:00
Richard Frith-MacDonald
cfac8c352c tidied enumeration code
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28235 72102866-910b-0410-8b05-ffd578937521
2009-04-19 13:47:47 +00:00
Richard Frith-MacDonald
807d1b8a65 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
Richard Frith-MacDonald
e537692852 more gc fixups
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28228 72102866-910b-0410-8b05-ffd578937521
2009-04-17 08:12:52 +00:00
Richard Frith-MacDonald
a4618dc473 port latest gc canges to windows
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28090 72102866-910b-0410-8b05-ffd578937521
2009-03-18 08:50:32 +00:00