Commit graph

59 commits

Author SHA1 Message Date
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
e7310bea03 register new selector as needed.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31179 72102866-910b-0410-8b05-ffd578937521
2010-08-17 18:38:00 +00:00
Richard Frith-MacDonald
00164a28ed Workaround for buggy runtime functions.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30154 72102866-910b-0410-8b05-ffd578937521
2010-04-14 11:52:21 +00:00
Richard Frith-MacDonald
7b12d4cc8e avoid objc_skip_offset()
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29814 72102866-910b-0410-8b05-ffd578937521
2010-03-01 10:34:35 +00:00
Richard Frith-MacDonald
e98d8f6da5 update argument types for latest api
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29811 72102866-910b-0410-8b05-ffd578937521
2010-03-01 05:43:08 +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
c8a6832349 cosmetic tweaks
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29657 72102866-910b-0410-8b05-ffd578937521
2010-02-17 11:47:06 +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
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
ec0b3ab41a MacOS-X compatibility updates.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@26598 72102866-910b-0410-8b05-ffd578937521
2008-06-06 13:57:06 +00:00
Richard Frith-MacDonald
0c30cbd8c0 Make sure type strings are nul terminated.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@26119 72102866-910b-0410-8b05-ffd578937521
2008-02-22 12:59:30 +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
854cd456b0 Various bugfixes, portability fixes, and optimisations.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@22576 72102866-910b-0410-8b05-ffd578937521
2006-02-27 09:35:19 +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
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
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
db315834d9 Minor performance tweak.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@16460 72102866-910b-0410-8b05-ffd578937521
2003-04-14 07:19:28 +00:00
Richard Frith-Macdonald
34332cb3ac Document
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@15423 72102866-910b-0410-8b05-ffd578937521
2002-12-31 10:52:54 +00:00
Richard Frith-Macdonald
97ee138a2b Tidy more GNUstep extensions.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@15137 72102866-910b-0410-8b05-ffd578937521
2002-11-27 12:52:29 +00:00
Richard Frith-Macdonald
b75da9fd95 Fix various minor documentation bugs.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@14777 72102866-910b-0410-8b05-ffd578937521
2002-10-14 11:05:49 +00:00
Richard Frith-Macdonald
f05b58bc61 Work on the train.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@14654 72102866-910b-0410-8b05-ffd578937521
2002-10-05 17:47:54 +00:00
Richard Frith-Macdonald
a194ff886d Fix typos etc
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@14301 72102866-910b-0410-8b05-ffd578937521
2002-08-20 15:07:58 +00:00
Richard Frith-Macdonald
85a0e0e943 Tidyups
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@13100 72102866-910b-0410-8b05-ffd578937521
2002-03-13 09:58:43 +00:00
Richard Frith-Macdonald
dc0470796f Documented new functions
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@12741 72102866-910b-0410-8b05-ffd578937521
2002-02-25 06:25:49 +00:00
Richard Frith-Macdonald
b9e8659c52 Key value fixes done ... needs testing.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@12740 72102866-910b-0410-8b05-ffd578937521
2002-02-25 06:14:31 +00:00
Richard Frith-Macdonald
59bdeabe4b Various fixes towards standardising runtime API and to cope with
unarchiving better where a class referred to in the archive does
not exist in the executing program.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@12625 72102866-910b-0410-8b05-ffd578937521
2002-02-21 13:31:13 +00:00
Richard Frith-Macdonald
c21ef3f265 Fix some argument names for autogsdoc
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@12538 72102866-910b-0410-8b05-ffd578937521
2002-02-13 22:25:38 +00:00
Richard Frith-Macdonald
d82bc8341f Fix by michael hanni
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@12489 72102866-910b-0410-8b05-ffd578937521
2002-02-11 09:54:01 +00:00
Manuel Guesdon
bb6cd75591 * Source/NSObjCRuntime.m:
o added NSAssert in GSGetInstanceVariable() and
                 GSSetInstanceVariable()


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@12478 72102866-910b-0410-8b05-ffd578937521
2002-02-10 12:54:27 +00:00
Richard Frith-Macdonald
a0a6f5f346 Added date version and title
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@11814 72102866-910b-0410-8b05-ffd578937521
2001-12-18 16:54:15 +00:00
Richard Frith-Macdonald
5be36e089c Many minor fixes for autogsdoc.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@11787 72102866-910b-0410-8b05-ffd578937521
2001-12-17 14:31:42 +00:00
Adam Fedor
b45f9f3970 New strerror-like function
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@10043 72102866-910b-0410-8b05-ffd578937521
2001-05-31 22:39:16 +00:00
Mirko Viviani
545718f0a4 * Source/NSObjCRuntime.m (GSInstanceVariableInfo): fixes.
* Source/NSObject.m ([NSObject -handleQueryWithUnboundKey:]): raise an
exception.
([NSObject -handleTakeValue:forUnboundKey:]): changed exception.
([NSObject -unableToSetNilForKey:]): likewise.
([NSObject -storedValueForKey:]),
([NSObject -valueForKey:]): check for null selector before calling
respondsToSelector:
([NSObject -takeStoredValue:forKey:]),
([NSObject -takeValue:forKey:]): likewise. Call GSSetValue with correct
values.
(GSSetValue): fixed ivar implementation.
(GSGetValue): likewise.
([NSObject -methodSignatureForSelector:]): FreeBSD fix.
* Source/NSEnumerator.m|.h ([NSEnumerator -allObjects]): implemented.
* Source/Unicode.m (GetDefEncoding): do not emit the warning for
NSISOLatin1StringEncoding.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@8467 72102866-910b-0410-8b05-ffd578937521
2001-01-03 11:22:59 +00:00
Richard Frith-MacDonald
c78a6ca413 key-value coding fixes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@8246 72102866-910b-0410-8b05-ffd578937521
2000-12-02 21:36:56 +00:00
Richard Frith-MacDonald
e23b85fd1a Tidied
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@8220 72102866-910b-0410-8b05-ffd578937521
2000-11-28 09:29:21 +00:00
Richard Frith-MacDonald
42011ceae4 Basic tidyup for start of support for apple runtime
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@7949 72102866-910b-0410-8b05-ffd578937521
2000-10-31 16:17:33 +00:00
Richard Frith-MacDonald
2565540346 NSString rewrite/reorganisation
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@7769 72102866-910b-0410-8b05-ffd578937521
2000-10-09 04:41:18 +00:00
Adam Fedor
078e46d305 Merge from dawn
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@4853 72102866-910b-0410-8b05-ffd578937521
1999-09-09 02:56:20 +00:00
Michael Silva
e5562f19ab Fixes bonaza.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@4725 72102866-910b-0410-8b05-ffd578937521
1999-08-19 23:30:03 +00:00
Richard Frith-MacDonald
13a0c075e4 Mostly tidying
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@4465 72102866-910b-0410-8b05-ffd578937521
1999-06-24 19:30:29 +00:00
Richard Frith-MacDonald
dda246a66e Minor param change
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@4287 72102866-910b-0410-8b05-ffd578937521
1999-05-25 06:41:48 +00:00
Manuel Guesdon
13ba146428 Thu Feb 11 19:25:00 1999 Manuel Guesdon <mguesdon@sbuilders.com>
* Source/NSObjCRuntime.m: Fixed error in GSGetInstanceVariable name:
        GSGetIinstanceVariable transformed to GSGetInstanceVariable


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@3692 72102866-910b-0410-8b05-ffd578937521
1999-02-11 19:08:06 +00:00
Richard Frith-MacDonald
4d4e790c67 Added functions to access instance variables.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@3566 72102866-910b-0410-8b05-ffd578937521
1999-01-15 11:24:03 +00:00
Adam Fedor
52f6bc90ae Makefile changes to compile thinkg in place.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@3496 72102866-910b-0410-8b05-ffd578937521
1998-12-20 21:27:47 +00:00
Richard Frith-MacDonald
e707cbd998 Keep mframe.h in a machine/os specific directory
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@3451 72102866-910b-0410-8b05-ffd578937521
1998-12-14 06:17:12 +00:00
Richard Frith-MacDonald
29060dd8af More performance improvements.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@3336 72102866-910b-0410-8b05-ffd578937521
1998-11-27 09:29:20 +00:00
Richard Frith-MacDonald
be3ff6a3e3 Rewrite of invocation code with new mframe code.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2930 72102866-910b-0410-8b05-ffd578937521
1998-08-13 20:45:32 +00:00