Richard Frith-MacDonald
c7eeb1bb08
Use GSObjCRuntime functions for selector types until/unless we can get
...
a standard runtime API that handles them.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32240 72102866-910b-0410-8b05-ffd578937521
2011-02-20 07:58:11 +00:00
Nicola Pero
0a0a147ae9
Updated for GCC 4.6
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31771 72102866-910b-0410-8b05-ffd578937521
2010-12-24 17:19:40 +00:00
Nicola Pero
30f098f9f8
Updated code to compile with GCC 4.6 and the new GNU Objective-C runtime
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31765 72102866-910b-0410-8b05-ffd578937521
2010-12-23 02:23:05 +00:00
Richard Frith-MacDonald
79eac15152
fix crash due to dereferencin a null pointer.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31570 72102866-910b-0410-8b05-ffd578937521
2010-10-27 22:19:18 +00:00
David Chisnall
704532b50c
Don't access isa directly.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31560 72102866-910b-0410-8b05-ffd578937521
2010-10-25 14:40:09 +00:00
Eric Wasylishen
4eba67f87b
Remove dead code
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31434 72102866-910b-0410-8b05-ffd578937521
2010-09-28 23:27:46 +00:00
Richard Frith-MacDonald
46076fe15b
fixup to get proxies working again
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31275 72102866-910b-0410-8b05-ffd578937521
2010-09-09 21:10:47 +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
Eric Wasylishen
ed30e20c20
Fix base build with libobjc2
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30988 72102866-910b-0410-8b05-ffd578937521
2010-07-16 18:00:45 +00:00
David Chisnall
e8e94cfcfb
Fix build with libobjc2.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30967 72102866-910b-0410-8b05-ffd578937521
2010-07-15 09:59:01 +00:00
Richard Frith-MacDonald
fe4fcbe5a1
remove old GC code
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30653 72102866-910b-0410-8b05-ffd578937521
2010-06-10 15:42:54 +00:00
Richard Frith-MacDonald
2b8d035def
add comment
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30618 72102866-910b-0410-8b05-ffd578937521
2010-06-08 16:17:56 +00:00
Richard Frith-MacDonald
bf8c2e4784
improve fix for broken forwarding
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30617 72102866-910b-0410-8b05-ffd578937521
2010-06-08 15:46:20 +00:00
Richard Frith-MacDonald
94fdf2eb27
simplify last change
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30616 72102866-910b-0410-8b05-ffd578937521
2010-06-08 05:03:14 +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
23fb22bf40
Fix invocation breakage.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30606 72102866-910b-0410-8b05-ffd578937521
2010-06-07 14:43:08 +00:00
David Chisnall
56d015fcd1
Work around some GNU runtime headers spelling isa incorrectly as 'class_pointer'.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30596 72102866-910b-0410-8b05-ffd578937521
2010-06-07 02:47:53 +00:00
David Chisnall
5f3c8920bd
...and also don't break when sending messages to proxies.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30594 72102866-910b-0410-8b05-ffd578937521
2010-06-07 00:35:28 +00:00
David Chisnall
5e9e5f7de8
Don't infinite loop when trying to send an unimplemented message to an object that doesn't implement -methodSignatureForSelector:
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30593 72102866-910b-0410-8b05-ffd578937521
2010-06-07 00:28:52 +00:00
David Chisnall
775dd86b02
Simplification of some invocation code.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30531 72102866-910b-0410-8b05-ffd578937521
2010-06-01 19:35:26 +00:00
Richard Frith-MacDonald
b730fa45c0
zero self after dealloc if we are going to call another method.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29837 72102866-910b-0410-8b05-ffd578937521
2010-03-04 12:24:43 +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
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
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
fe0c983a05
Get gnustep runtime specific code to compile ... don't know if it works.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29700 72102866-910b-0410-8b05-ffd578937521
2010-02-22 10:56:07 +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
99b0669aff
improve error message
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29074 72102866-910b-0410-8b05-ffd578937521
2009-11-27 10:55:42 +00:00
Richard Frith-MacDonald
39bb68003d
better attempt at workaround for broken libobjc
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29057 72102866-910b-0410-8b05-ffd578937521
2009-11-24 20:39:31 +00:00
Richard Frith-MacDonald
e4a6d046be
cleanups
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28787 72102866-910b-0410-8b05-ffd578937521
2009-10-10 08:16:17 +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
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
7f8c48ddfc
Added configure thingy to detect presence of runtime.h. Autoconf stuff by Wonfgang Lux.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28730 72102866-910b-0410-8b05-ffd578937521
2009-09-23 11:52:32 +00:00
David Chisnall
47eab60ed8
Added implementations of the hooks provided by the new runtime. This brings
...
NSObject up to feature-parity with the OS X 10.5 implementation when using the
new runtime and up to feature-parity with the 10.6 implementation if you are
using the new runtime and compiling with clang.
Also removes the objc_mutex_wibble stuff from NSObject in favour of just using
NSLocks (which, with the new implementation, are now faster than using
objc_mutex_stuff).
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28657 72102866-910b-0410-8b05-ffd578937521
2009-09-10 20:14:42 +00:00
Wolfgang Lux
9c86cf78f2
Fix bug #26419 by removing bogus code which was used on targets where
...
MFRAME_STRUCT_BYREF is defined.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28331 72102866-910b-0410-8b05-ffd578937521
2009-06-06 14:44:26 +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
c4a2f62ad0
Applied patch #6677
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27080 72102866-910b-0410-8b05-ffd578937521
2008-11-17 13:45:32 +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
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
badee0369b
Add windows memory protection code
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@26730 72102866-910b-0410-8b05-ffd578937521
2008-06-29 18:33:59 +00:00
Richard Frith-MacDonald
2f07465737
Improve code for making executable memory
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@26727 72102866-910b-0410-8b05-ffd578937521
2008-06-29 09:18:33 +00:00
Richard Frith-MacDonald
4d4a1d73e4
More portable anonymous mmap
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@26725 72102866-910b-0410-8b05-ffd578937521
2008-06-28 20:30:54 +00:00
Richard Frith-MacDonald
6984a82930
Try to ensure that ffi uses executable memory and doesn't segfault
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@26723 72102866-910b-0410-8b05-ffd578937521
2008-06-28 05:13:47 +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
d6cfc0e91c
Improve MacOS-X compatibility of headers.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@25638 72102866-910b-0410-8b05-ffd578937521
2007-11-29 20:53:26 +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
7c633ab823
Some tweaks for invocations and for networking.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@25140 72102866-910b-0410-8b05-ffd578937521
2007-05-11 08:26:59 +00:00