Commit graph

120 commits

Author SHA1 Message Date
rfm
6f7a4d74c2 Fix leaks 2025-01-09 09:19:03 +00:00
rfm
cf8c387900 Correct the fix for the FFI invocation memory leak. 2025-01-09 06:21:48 +00:00
rfm
ebedfaf5c1 avoid a couple of compiler warnings 2024-11-19 12:57:59 +00:00
rfm
bdad4987ae Fix leaked FFI structure argument/returntype information 2024-11-15 15:43:47 +00:00
rfm
6667842dd5 Update FSF address as requested by Gregory 2024-11-07 13:37:59 +00:00
Richard Frith-Macdonald
0b1a2d4d66 Tidy positioning of semicolon to be inside IF_NO_ARC() macros so it won't appear in the source when compiled with ARC 2022-02-17 10:21:36 +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
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
62d2bcbabc changes for use of _WIN32 define on windows
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39492 72102866-910b-0410-8b05-ffd578937521
2016-03-09 13:16:16 +00:00
Richard Frith-MacDonald
43f07926da reinstate deleted code (bug #42405)
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@37904 72102866-910b-0410-8b05-ffd578937521
2014-05-22 16:55:18 +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
e6c15aef54 crude KVO setter for structs
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@35324 72102866-910b-0410-8b05-ffd578937521
2012-07-27 16:48:49 +00:00
Richard Frith-MacDonald
d3b4830a65 try to work round selinux restrictions on invocations
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34660 72102866-910b-0410-8b05-ffd578937521
2012-01-29 16:57:06 +00:00
Richard Frith-MacDonald
3fcd9f7d04 word size fixups
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34468 72102866-910b-0410-8b05-ffd578937521
2012-01-09 08:28:27 +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
Richard Frith-MacDonald
eb8b275c1f internal workaround for clang namespace pollution.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33993 72102866-910b-0410-8b05-ffd578937521
2011-10-14 15:46:13 +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
Richard Frith-MacDonald
74eac99280 add last night's changes based on static analyser results.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32507 72102866-910b-0410-8b05-ffd578937521
2011-03-09 10:24:18 +00:00
Richard Frith-MacDonald
96e48988fc avoid compiler/linker warnings
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32483 72102866-910b-0410-8b05-ffd578937521
2011-03-07 11:34:17 +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
Richard Frith-MacDonald
5a58a65949 update NSPage functions for windows
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30772 72102866-910b-0410-8b05-ffd578937521
2010-06-17 19:08:08 +00:00
Richard Frith-MacDonald
fcdd57d05f minor memory management updates/cleanups
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30760 72102866-910b-0410-8b05-ffd578937521
2010-06-16 08:45:49 +00:00
Richard Frith-MacDonald
67334b918f minor portability improvement
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30726 72102866-910b-0410-8b05-ffd578937521
2010-06-15 05:43:38 +00:00
Richard Frith-MacDonald
4ccce03998 trivial indentation fix
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30725 72102866-910b-0410-8b05-ffd578937521
2010-06-15 05:31:37 +00:00
Riccardo Mottola
37078c8e66 Protect page-aligned and unprotect before freeing.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30719 72102866-910b-0410-8b05-ffd578937521
2010-06-15 00:03:09 +00:00
Riccardo Mottola
f98d543fc1 Protect page-aligned and unprotect before freeing.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30718 72102866-910b-0410-8b05-ffd578937521
2010-06-14 23:52:44 +00:00
Richard Frith-MacDonald
4e0ef853d3 rework memory management for ffi
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30611 72102866-910b-0410-8b05-ffd578937521
2010-06-07 20:38:19 +00:00
Richard Frith-MacDonald
f784646663 generalize define from __MINGW32__ to __MINGW__
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30001 72102866-910b-0410-8b05-ffd578937521
2010-03-19 12:10:11 +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
166f1afb4b build additions with NO_GNUSTEP=1
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29771 72102866-910b-0410-8b05-ffd578937521
2010-02-26 08:39:47 +00:00
Richard Frith-MacDonald
14b91c9052 fixups for libobjc2
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29753 72102866-910b-0410-8b05-ffd578937521
2010-02-25 18:49:31 +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
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
715bdcaa0a a bit step towards removing obsolete mframe code.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28774 72102866-910b-0410-8b05-ffd578937521
2009-10-04 15:26:07 +00:00
Richard Frith-MacDonald
e93dcbf681 fix leak
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28771 72102866-910b-0410-8b05-ffd578937521
2009-10-04 10:05:14 +00:00
Richard Frith-MacDonald
a8eba2055d bugfix
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28767 72102866-910b-0410-8b05-ffd578937521
2009-10-03 18:34:44 +00:00
David Chisnall
0fc392ad98 * Source/NSObject:
- Tweaked NSObject to use atomic ops with LLVM as well as gcc (this
		  probably isn't actually needed)
		- Fixed SIGFPE problem on FreeBSD using proper interfaces instead of 
		an asm hack.
	* Removes various mframe things from being compiled when ffcall/libffi is
	used (mframe.m, NSConnection.m, NSInvocation.m)
	* Turned a nested function in make_strings.m into a macro.  

Tested by Gregory - blame him for any breakage...



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28462 72102866-910b-0410-8b05-ffd578937521
2009-08-15 21:44:21 +00:00
Richard Frith-MacDonald
9db45a6d7e Remove unused private method pointed out by David Chisnall
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28161 72102866-910b-0410-8b05-ffd578937521
2009-03-31 16:04:29 +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
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
7e82f60a9e tweak to ensure we have anonymous memory if we are using mmap
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@26739 72102866-910b-0410-8b05-ffd578937521
2008-07-02 10:46:16 +00:00
Richard Frith-MacDonald
1cc66c3501 Imprivemewnts to get NS_MESSAGE and NS_INVOCATION working for FFI.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@26733 72102866-910b-0410-8b05-ffd578937521
2008-06-30 05:29:19 +00:00
Richard Frith-MacDonald
7f1b63a68f fixup for windows memory protection
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@26732 72102866-910b-0410-8b05-ffd578937521
2008-06-29 19:21:15 +00:00
Richard Frith-MacDonald
bf8c928b7e Tidy executable memory support
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@26731 72102866-910b-0410-8b05-ffd578937521
2008-06-29 18:44:41 +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