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
Richard Frith-MacDonald
eae859d1c7
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
Richard Frith-MacDonald
546aa0c854
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
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
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
Quentin Mathe
3df62a4799
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
Adam Fedor
750130f0e6
* 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
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
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
David Ayers
8cd30609bf
* 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
Adrian Robert
bda35fceb3
added GSdoc comments to class, method, and function declarations; for some classes some comments were already in the source file (not the header), in which case further comments were added here; otherwise comments were put in the headers
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@19588 72102866-910b-0410-8b05-ffd578937521
2004-06-22 22:40:40 +00:00
David Ayers
fda10c748a
Various GSObjCRuntime usage cleanups.
...
See ChangeLog for details.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@17533 72102866-910b-0410-8b05-ffd578937521
2003-08-24 23:07:41 +00:00
David Ayers
ac30183cd6
Header reorganizsateion - Please refer to ChangeLog
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@17407 72102866-910b-0410-8b05-ffd578937521
2003-07-31 23:49:32 +00:00
Richard Frith-Macdonald
54b5983408
Tidied
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@17372 72102866-910b-0410-8b05-ffd578937521
2003-07-27 08:59:08 +00:00
David Ayers
f6c50c154d
* Source/GSFFCallInvocation.m
...
(gs_method_for_receiver_and_selector): Replace usage of
class_get_instance/class_method with GSGetInstance/ClassMethod and
Method_t with GSMethod.
(gs_find_by_receiver_best_typed_sel): Ditto.
(GSInvocationCallback): Ditto.
([GSFFCallInvocation -invokeWithTarget:]): Ditto.
* Source/GSFFIInvocation.m
(gs_method_for_receiver_and_selector): Ditto.
(gs_find_by_receiver_best_typed_sel): Ditto.
(GSFFIInvocationCallback): Ditto.
([GSFFIInvocation -invokeWithTarget:]): Ditto.
* Source/NSConnection.m
([NSConnection -_service_typeForSelector:]): Ditto.
* Source/NSInvocation.m
([NSInvocation -invokeWithTarget:]): Ditto.
* Source/NSObject.m
([NSObject +instanceMethodSignatureForSelector:]): Ditto.
([NDObject -methodSignatureForSelector:]): Ditto.
([NSObject +descriptionForInstanceMethod:]): Ditto.
([NSOnject -descriptionForMethod:]: Ditto.
* Source/NSProxy.m
([NSProxy +methodSignatureForSelector:]): Ditto.
([NSProxy -methodSignatureForSelector:]): Ditto.
* Source/NSDistantObject.m
([NSObject -selectorTypeForProxy:]): Ditto.
([NSDistantObject +respondsToSelector:]): Ditto. Corrected
implementation to check class methods instead of instance methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@17016 72102866-910b-0410-8b05-ffd578937521
2003-06-25 10:26:29 +00:00
Adam Fedor
d228cba99b
Change syntax of includes
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@16874 72102866-910b-0410-8b05-ffd578937521
2003-06-07 01:24:41 +00:00
Richard Frith-Macdonald
b283c8d930
Tidyup categories
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@16478 72102866-910b-0410-8b05-ffd578937521
2003-04-17 06:20:17 +00:00
Richard Frith-Macdonald
44d5f83483
Minor documentation tweak
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@16442 72102866-910b-0410-8b05-ffd578937521
2003-04-12 05:13:54 +00:00
Richard Frith-Macdonald
5b950f5d0e
Added documentation
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@16352 72102866-910b-0410-8b05-ffd578937521
2003-04-04 10:59:11 +00:00
Richard Frith-Macdonald
9f7fa664d7
Added some invocation support.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@16349 72102866-910b-0410-8b05-ffd578937521
2003-04-04 10:03:08 +00:00
Richard Frith-Macdonald
3a344ae100
MInor tidyup.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@16105 72102866-910b-0410-8b05-ffd578937521
2003-03-02 07:47:18 +00:00
Richard Frith-Macdonald
382a204d75
Invocation fixes
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@15873 72102866-910b-0410-8b05-ffd578937521
2003-02-04 18:18:47 +00:00