Commit graph

101 commits

Author SHA1 Message Date
rfm
5f1b5c1985 consistency tweaks and simplify documentation flags in make files by automatically adding most work map entries.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@37629 72102866-910b-0410-8b05-ffd578937521
2014-01-23 09:36:37 +00:00
wlux
89d31db7b2 Generate useful error message when no best typed selector can be found
in forwarding callback.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@35784 72102866-910b-0410-8b05-ffd578937521
2012-11-05 15:16:30 +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
155870ef50 fi for bug #36706
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@35278 72102866-910b-0410-8b05-ffd578937521
2012-07-09 15:31:12 +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
9850140128 fix for incorrect types comparison
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34591 72102866-910b-0410-8b05-ffd578937521
2012-01-19 10:12:03 +00:00
rfm
da19c7df2e trivial formating tweaks ... add missing white space
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34374 72102866-910b-0410-8b05-ffd578937521
2012-01-01 07:38:53 +00:00
rfm
6cd7e3a588 Attempt workaround for runtime providing insufficient information in callback.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33814 72102866-910b-0410-8b05-ffd578937521
2011-09-07 09:42:50 +00:00
rfm
79383c613d fix includes for gcc-4.6
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33069 72102866-910b-0410-8b05-ffd578937521
2011-05-19 08:19:24 +00:00
rfm
5b47a4bd32 old/new objc api updates
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33027 72102866-910b-0410-8b05-ffd578937521
2011-05-12 16:03:08 +00:00
rfm
6042f80fe1 improve typed selector handling
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32642 72102866-910b-0410-8b05-ffd578937521
2011-03-18 06:32:47 +00:00
rfm
c67bc6bc20 fix typo
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32398 72102866-910b-0410-8b05-ffd578937521
2011-02-27 23:34:57 +00:00
rfm
08440691cb simplify typed selector usage.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32396 72102866-910b-0410-8b05-ffd578937521
2011-02-27 23:29:25 +00:00
nicola
ff4fa6aa4a Implemented lookup of selector with a type for __GNU_LIBOBJC__. We can simply use sel_copyTypedSelectorList() to access the full list of selectors with a certain name.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32296 72102866-910b-0410-8b05-ffd578937521
2011-02-22 13:34:49 +00:00
rfm
f2e81c9391 OSX compatibility changes and other minor tweaks
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32279 72102866-910b-0410-8b05-ffd578937521
2011-02-22 07:05:36 +00:00
theraven
70588c3ad2 Some changes to method type lookup when forwarding. Alway use the compiler-supplied type information if it exists - this is guaranteed to by the correct type encoding for the call frame and lets us deconstruct it correctly. We can then fail gracefully later on when trying to invoke the selector if the types in the callee don't match, rather than by reading nonsense from the stack now.
When using the GNUstep runtime, use the safe mechanism for checking whether there is more than one typed selector, and only use that as a guess if it is safe to do so.  With the GCC runtime, we are still stuck using the API that it is impossible to use safely (we might be better off just giving up at this point), but now we call this after -methodSignatureForSelector:, so the app developer gets a chance to do the right thing before we do the wrong thing.

Also changed the assert to throw an exception if no type signature can be found.  This behaviour is consistent with Mac OS X.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32257 72102866-910b-0410-8b05-ffd578937521
2011-02-21 11:05:33 +00:00
rfm
fb08144b5e Replace old code directly referencing class_pointer ivar with calls to the new runtime API treating objects as opaque pointers.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32243 72102866-910b-0410-8b05-ffd578937521
2011-02-20 12:28:12 +00:00
rfm
050f3f7190 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
9db061f0a6 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
b84001b073 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
rfm
7a53294125 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
theraven
cb7519482c 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
ericwa
f9e27b419f 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
rfm
0620733951 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
theraven
f392469c64 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
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
ericwa
82b2424b9a 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
theraven
0d8f26e852 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
rfm
fc65967087 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
rfm
d6a8521c5e 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
rfm
08e7eabc76 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
rfm
68241e49bb 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
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
122c4b087a 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
theraven
d6b7b103ab 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
theraven
dbaf7ed0cc ...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
theraven
dd9e1a4611 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
theraven
07a830b86a 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
rfm
63374c948b 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
rfm
df6384cc18 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
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
48070cb1ca 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
rfm
dd941257f8 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
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
9a772dd309 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
rfm
3a390b4d65 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
rfm
6bf3a906e9 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
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