Commit graph

111 commits

Author SHA1 Message Date
rfm
daf60f9a4d 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
rfm
1483924463 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
rfm
e357aab701 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
rfm
92ae73861f 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
rfm
b143b3fabf 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
rfm
5b0ed744eb 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
rfm
b644d057ee 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
fredkiefer
9e7246aa24 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
theraven
5568644a5e 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
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
rfm
3b9be31642 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
rfm
dbaa646d12 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
theraven
85549433db 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
rfm
797d975df9 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
rfm
87f719480f 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
rfm
ddb072851c 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
rfm
4a7ab91a44 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
rmottola
d796fc33c5 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
rmottola
9af5a6d95d 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
rfm
acda1d1480 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
rfm
1a5d643771 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
rfm
1a6af09e33 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
rfm
9491c87559 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
rfm
7ff4d4c9c7 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
rfm
53beb40301 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
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
rfm
16ce1cd7b3 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
rfm
2fc494c446 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
rfm
de17e037eb 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
rfm
182a297143 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
theraven
0e2e4aa752 * 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
rfm
17e3bcd42e 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
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
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
6a1a276e1f 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
rfm
af084a115a 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
rfm
a12a537b6f 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
rfm
703aff6ef5 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
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
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
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
85b1050160 Avoid some gcc-4.1 compiler warnings.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@22932 72102866-910b-0410-8b05-ffd578937521
2006-05-15 12:07:35 +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
CaS
5af2d9d0a2 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
qmathe
1c3d59ee22 Fixed NSUndoManager bug #14448 by extending NSInvocation with the possibility to retain or not the target
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@21721 72102866-910b-0410-8b05-ffd578937521
2005-09-17 21:41:12 +00:00
fedor
2eab253156 * Source/NSInvocation.m (-getReturnValue:, -setReturnValue:): Only
muck with size of buffer if we're using (deprecated) mframe.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@21377 72102866-910b-0410-8b05-ffd578937521
2005-06-29 14:40:11 +00:00
fedor
376e495dad * 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
CaS
0708409c1b 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
ayers
b803fe27a6 * Headers/Foundation/NSMethodSignature.h:
(NSArgumentInfo): Document limitations of NSArgumentInfo's
        offset and registier information.  Match size for NO_GNUSTEP.
        (NSMethodSignature): Match ivar name with runtime information.

        * Source/GSFFCallInvocation.m
        * Source/GSFFIInvocation.m
        * Source/NSInvocation.m
        (gs_method_for_receiver_and_selector)
        ([-invokeWithTarget:]): Use GSGetMethod instead of deprecated
        GSGetInstanceMethod and GSGetClassMethod.
        * Source/NSConnection.m ([-_service_typeForSelector]): Ditto.
        * Source/NSDistantObject.m ([+respondsToSelector]): Ditto.
        * Source/NSObject.m ([+instanceMethodSignatureForSelector:])
        ([-methodSignatureForSelector:])
        ([+descriptionForInstanceMethod], [-descriptionForMethod]): Ditto.
        * Source/NSProtocolChecker.m ([-methodSignatureForSelector]): Ditto.
        * Source/NSProxy.m ([+methodSignatureForSelector])
        ([-methodSignatureForSelector]): Ditto.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@19896 72102866-910b-0410-8b05-ffd578937521
2004-08-20 17:53:16 +00:00