Commit graph

113 commits

Author SHA1 Message Date
rfm
6667842dd5 Update FSF address as requested by Gregory 2024-11-07 13:37:59 +00:00
rfm
9367c2d796 use memory management notation for clang static analyzer 2024-06-23 10:35:16 +01:00
rfm
7532837db4 fix method names 2024-06-21 21:18:17 +01:00
Richard Frith-Macdonald
ea1575b63c fix bug in testing whether an NSDistantObject responds to selectors. 2022-02-25 13:00:55 +00:00
Richard Frith-Macdonald
c76ebf2962 Replaced IF_NO_GC() macro calls with the more descriptive IF_NO_ARC()
and deprecate it.  Searched for and removed obsolete references to
garbage collection in comments and documentation.
2022-02-17 10:08:18 +00:00
Frederik Seiffert
27c06a9209 Fix various incorrect format string types 2021-08-11 19:32:21 +02: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
Gregory John Casamento
753c907938 Fix address for FSF and License name in all headers in base 2019-12-09 18:36:00 -05: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
fredkiefer
e69450400a * Source/GSFormat.m: Call va_end with the correct parameter.
* Source/NSObject+NSComparisonMethods.m: Add missing return.
* Source/GSString.m (-replaceCharactersInRange:withString:,
-initWithBytesNoCopy:...freeWhenDone:): Remove dead code.
* Source/NSDistantObject.m (-initWithCoder:): Remove dead code.
* Source/NSPredicate.m (_eval_avg:): Don't devide by zero.
Fix issues found by Coverity.
2018-02-01 22:31:15 +01:00
Richard Frith-MacDonald
1d2c5edcf1 avoid a couple of compiler warnings
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39764 72102866-910b-0410-8b05-ffd578937521
2016-05-14 15:06:32 +00:00
Richard Frith-MacDonald
67e4c0581d standardise -setDebug: extension
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39554 72102866-910b-0410-8b05-ffd578937521
2016-03-17 08:12:45 +00:00
Richard Frith-MacDonald
ec73ec0593 trivial tweaks
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39423 72102866-910b-0410-8b05-ffd578937521
2016-02-29 09:41:14 +00:00
Richard Frith-MacDonald
5fac2e2ca2 tidyups
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@36517 72102866-910b-0410-8b05-ffd578937521
2013-04-13 10:40:15 +00:00
Niels Grewe
383d5ccec2 Changes to support clang's __attribute__((objc_root_class)).
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@35412 72102866-910b-0410-8b05-ffd578937521
2012-08-16 12:31:16 +00:00
Richard Frith-MacDonald
eec9f0e452 64bit printf tweaks
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34401 72102866-910b-0410-8b05-ffd578937521
2012-01-03 14:48:04 +00:00
Fred Kiefer
80c8a7ff06 Temporary revert David's change to use PRIxPTR, PRIuPTR and
PRIdPTR. Old compilers don't handled these well. (That change
didn't have a ChangeLog entry)


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33766 72102866-910b-0410-8b05-ffd578937521
2011-08-20 13:05:37 +00:00
David Chisnall
4cdea64975 Make -base compile almost without warnings again. Fixes:
- Using the correct format specifier
- Remove substringFromRange: (GNUstep extension) from NSString.h and use the non-deprecated version in -base.
- Delete definitions of methods that are the same in both a class and a category on that class (NSArray and NSObject).

Two files still have warnings:

- The GNUTLS stuff is using a load of deprecated APIs.
- xmlparse.m replaces a method using a category.  This method seems to always return nil.  Not sure what it's meant to do, or why it isn't a delegate of some kind.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33756 72102866-910b-0410-8b05-ffd578937521
2011-08-16 16:04:43 +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
Eric Wasylishen
7282e58e08 * Source/NSDistantObject.m: #ifdef to disable category
on Object was forgotten around the interface


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31280 72102866-910b-0410-8b05-ffd578937521
2010-09-09 22:18:01 +00:00
David Chisnall
4488708e84 Fix a load of warnings from implicit function declarations. A lot were caused by ctype.h and string.h stuff being used everywhere in GNUstep but not included anywhere - they're now included in common.h (at least string.h should also be in Foundation.h - on OS X it is implicitly included via some chain of things from Foundation.h).
All of the sel_* stuff is now replaced with the newer APIs.  As a side-effect, a blob of code that was copied-and-pasted all over GNUstep has now been moved into ObjectiveC2 and just called.

Class posing with libobjc2 will now throw an exception, rather than just aborting.  



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31268 72102866-910b-0410-8b05-ffd578937521
2010-09-09 16:30:10 +00:00
David Chisnall
7a80adeb9b A huge blob of changes to make -base build with libobjc2, without using the old libobjc2 headers.
Most of these changes involve simply removing direct manipulation of any runtime structures and replacing them with runtime function calls.  For example class->name becomes class_getName(class) and so on.

libobjc2, like the Apple runtime, the NeXT runtime, and every version of the Objective-C spec, calls the class pointer in id isa.  A few files now have #define class_pointer isa at the top.  This line replaces class_pointer in the old GNU libobjc headers with isa so either class_pointer or isa can be used for accessing the class of an object.  Note: object_getClass() should be used in most cases because, in some future version of the runtime, this will skip things like lock classes and other hidden classes (e.g. KVO classes).

All of the old forwarding stuff has been removed.  Most of this stuff followed convoluted code paths that ended with an exception.  A few simply broke in exciting ways.  Hopefully no one has used them for the last ten years or so, but we can bring them back with some #ifndef stuff if they're really needed by anyone.

There is currently a bug in configure, which prevents dladdr() from being detected, so you need to manually tweak config.h to build - I have not fixed the fall-back code in objc-load.m to work with libobjc2, I just added a new version that uses the loader's functionality directly.  

Although -base now builds, it builds with a lot of warnings.  <string.h> is missing from a lot of files, so memcpy() and strlen() generate implicit function declaration warnings.  

Additionally, libobjc2 does still provide the sel_{get,register}_*() functions, but they're wrappers around the newer API ones.  These are deprecated and are not exposed in the headers.  Although they work, we should be replacing them with the libobjc2 versions as soon as possible.

This incorporates a patch by Eric.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31265 72102866-910b-0410-8b05-ffd578937521
2010-09-09 15:06:09 +00:00
David Chisnall
0898a4c4b2 Fix the return type of NSDistantObject +autorelease to return id, not void. Type-dependent dispatch in libobjc2 discovered that some things are picking up this method signature by accident and calling NSObject's -autorelease with the wrong types.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31224 72102866-910b-0410-8b05-ffd578937521
2010-08-31 22:02:38 +00:00
Richard Frith-MacDonald
821a21b54d better cope with null selectors.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31178 72102866-910b-0410-8b05-ffd578937521
2010-08-17 18:36:46 +00:00
Richard Frith-MacDonald
50662ad093 avoid some compiler warnings
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31107 72102866-910b-0410-8b05-ffd578937521
2010-08-10 10:38:50 +00:00
Richard Frith-MacDonald
8aadd12c71 remove a few obsolete, unused methods
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29785 72102866-910b-0410-8b05-ffd578937521
2010-02-27 06:53:43 +00:00
Richard Frith-MacDonald
4497ba7bdd Build with non-fragile ivars.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29715 72102866-910b-0410-8b05-ffd578937521
2010-02-24 10:23:47 +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
7e8e79ae94 avoid unnecessary requests for signatures to remote process
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29652 72102866-910b-0410-8b05-ffd578937521
2010-02-16 17:08:47 +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
a6c9c8749a lrge changes to remove mframe
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28778 72102866-910b-0410-8b05-ffd578937521
2009-10-05 16:00:28 +00:00
Richard Frith-MacDonald
80fe7ffde0 fixup indentaton.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28352 72102866-910b-0410-8b05-ffd578937521
2009-06-15 07:13:11 +00:00
Gregory John Casamento
a4996f8d05 Incorporated patch by David Chisnall.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28326 72102866-910b-0410-8b05-ffd578937521
2009-06-05 22:16:07 +00:00
Richard Frith-MacDonald
b830b55dee Change finalization to match MacOS-X
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27581 72102866-910b-0410-8b05-ffd578937521
2009-01-12 18:36:37 +00:00
Richard Frith-MacDonald
952af9c197 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
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
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
0ebe68ae48 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
Richard Frith-MacDonald
c2e8c881e7 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
Richard Frith-Macdonald
da398713b7 More sized type tidyups
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@22293 72102866-910b-0410-8b05-ffd578937521
2006-01-11 09:32:13 +00:00
Richard Frith-Macdonald
15a2e17e48 Tidy use of sized datatypes. Check for invalid asumption of interchangability
of int/long in encoder/decoder methods.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@22291 72102866-910b-0410-8b05-ffd578937521
2006-01-11 08:37:16 +00:00
Richard Frith-Macdonald
06981169ed Fixes for 64bit systems .. mostly cosmetic avoidance of compiler warnings.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@22282 72102866-910b-0410-8b05-ffd578937521
2006-01-10 10:29:11 +00:00
Richard Frith-Macdonald
c9c6734169 Spelling fixes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@21962 72102866-910b-0410-8b05-ffd578937521
2005-11-06 13:53:40 +00:00
Adam Fedor
f0512c406e * Remove objc/Protocol.h include from NSObject to avoid warnings
with conflicting method signatures.
* Headers/Foundation/NSConnection.h: Change Object categories
to NSObject.
* Source/NSConnection.m: Idem.
* Headers/Foundation/NSObject.h: Don't include objc/Protocol.h
add a few missing things.
* Source/NSDate.m ([NSDate -isEqual:]): Use isKindOfClass.
* Source/NSDistantObject.m, Source/NSProtocolChecker.m:
Include objc/Protocol.h
* Source/NSSerializer.m: Add method sig for performv::


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@21322 72102866-910b-0410-8b05-ffd578937521
2005-06-17 14:51:57 +00:00
Adam Fedor
fcc13ccd0f * Update FSF Address.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@21245 72102866-910b-0410-8b05-ffd578937521
2005-05-22 03:32:16 +00:00
Richard Frith-Macdonald
fd7d6e36b0 Tidyups to avoid compiler warnings.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@20863 72102866-910b-0410-8b05-ffd578937521
2005-03-07 11:19:34 +00:00
Richard Frith-Macdonald
db7b22a4fb Tidy up use of white space so we have it after if/for/while and not after (
or before ) or padding at end of line.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@20773 72102866-910b-0410-8b05-ffd578937521
2005-02-22 11:22:44 +00:00
Alexander Malmberg
c668c9d96a * Source/NSDistantObject.m: Make proxyLocation an enum tag, not a
variable.
	* Source/NSFileManager.m (custom_strdup, append_file_to_path): Make
	static.
	* Source/NSString.m (-isEqual:): Clarify documentation.
	* Source/NSUnarchiver.m (mapClassObject, mapClassName): Make static.
	* Source/Additions/Unicode.m (GetDefEncoding): Add missing void in
	the prototype.
	* Tools/make_strings/make_strings.m (ParseFile): Remove spurious
	static on the nested function add_arg_ch.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@20163 72102866-910b-0410-8b05-ffd578937521
2004-09-27 21:32:45 +00:00