diff options
author | nicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-12 18:43:54 +0000 |
---|---|---|
committer | nicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-12 18:43:54 +0000 |
commit | f75aa15889d4afbf4944da0dc3dba5ba3c21a0c1 (patch) | |
tree | b4d41623d7f15f6d47b2a7f3c02ac077462df0f9 /libobjc/exception.c | |
parent | a10fc41a0de5e88df4bfeeda0b72f41101232913 (diff) | |
download | gcc-f75aa15889d4afbf4944da0dc3dba5ba3c21a0c1.tar.gz |
In libobjc/:
2010-10-12 Nicola Pero <nicola.pero@meta-innovation.com>
* class.c: Include objc/runtime.h and objc-private/module-abi-8.h
instead of objc/objc-api.h.
(objc_get_unknown_class_handler): Do not define.
(class_isMetaClass): New.
(class_getSuperclass): New.
(class_getVersion): New.
(class_setVersion): New.
(class_getInstanceSize): New.
* exceptions.c: Include objc/runtime.h instead of objc/objc-api.h.
(is_kind_of_exception_matcher): Use objc_getSuperclass instead of
objc_get_super_class.
(get_ttype_entry): Use objc_getRequiredClass instead of
objc_get_class.
* ivars.c (class_getClassVariable): New.
* objects.c: Include objc/runtime.h, objc/thr.h and
objc-private/module-abi-8.h instead of objc/objc-api.h
* objc/runtime.h (class_getClassVariable): New.
(class_isMetaClass): New.
(class_getSuperclass): New.
(class_getVersion): New.
(class_setVersion): New.
(class_getInstanceSize): New.
* objc-private/module-abi-8.h (HOST_BITS_PER_LONG): New (from
objc/objc-api.h)
(__CLS_INFO): Same.
(__CLS_ISINFO): Same.
(__CLS_SETINFO): Same.
(CLS_ISMETA): Same.
(CLS_ISCLASS): Same.
(CLS_ISRESOLV): Same.
(CLS_SETRESOLV): Same.
(CLS_ISINITIALIZED): Same.
(CLS_SETINITIALIZED): Same.
(CLS_GETNUMBER): Same.
(CLS_SETNUMBER): Same.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165392 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libobjc/exception.c')
-rw-r--r-- | libobjc/exception.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/libobjc/exception.c b/libobjc/exception.c index a221a3e77e3..4883448afad 100644 --- a/libobjc/exception.c +++ b/libobjc/exception.c @@ -25,7 +25,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include "objc-private/common.h" #include <stdlib.h> #include "config.h" -#include "objc/objc-api.h" +#include "objc/runtime.h" #include "objc/objc-exception.h" #include "unwind.h" #include "unwind-pe.h" @@ -57,7 +57,7 @@ is_kind_of_exception_matcher (Class catch_class, id exception) Class c; for (c = exception->class_pointer; c != Nil; - c = class_get_super_class (c)) + c = class_getSuperclass (c)) if (c == catch_class) return 1; } @@ -191,9 +191,11 @@ get_ttype_entry (struct lsda_header_info *info, _uleb128_t i) ptr = (_Unwind_Ptr) (info->TType - (i * 4)); ptr = _Unwind_decode_target2 (ptr); - + + /* NULL ptr means catch-all. Note that if the class is not found, + this will abort the program. */ if (ptr) - return objc_get_class ((const char *) ptr); + return objc_getRequiredClass ((const char *) ptr); else return 0; } @@ -209,9 +211,10 @@ get_ttype_entry (struct lsda_header_info *info, _Unwind_Word i) read_encoded_value_with_base (info->ttype_encoding, info->ttype_base, info->TType - i, &ptr); - /* NULL ptr means catch-all. */ + /* NULL ptr means catch-all. Note that if the class is not found, + this will abort the program. */ if (ptr) - return objc_get_class ((const char *) ptr); + return objc_getRequiredClass ((const char *) ptr); else return 0; } |