diff options
author | Kresten Krab Thorup <krab@gcc.gnu.org> | 1993-05-05 15:52:00 +0000 |
---|---|---|
committer | Kresten Krab Thorup <krab@gcc.gnu.org> | 1993-05-05 15:52:00 +0000 |
commit | 90a0448559cf57a0cc464b19646afa228b069a50 (patch) | |
tree | 4e271cb7eea35b03d3cc54c6b8aeacc39b6fdfc9 /gcc/objc/misc.c | |
parent | 6731a3e3a0a29ce66cc04e00526562246b80f16a (diff) | |
download | gcc-90a0448559cf57a0cc464b19646afa228b069a50.zip gcc-90a0448559cf57a0cc464b19646afa228b069a50.tar.gz gcc-90a0448559cf57a0cc464b19646afa228b069a50.tar.bz2 |
undid freed+error patch
From-SVN: r4336
Diffstat (limited to 'gcc/objc/misc.c')
-rw-r--r-- | gcc/objc/misc.c | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/gcc/objc/misc.c b/gcc/objc/misc.c index ec42c2c..6b6b342 100644 --- a/gcc/objc/misc.c +++ b/gcc/objc/misc.c @@ -25,7 +25,6 @@ You should have received a copy of the GNU General Public License along with covered by the GNU General Public License. */ #include "runtime.h" -#include "error.h" void objc_error(id object, const char* fmt, va_list); @@ -71,46 +70,3 @@ __objc_xcalloc(size_t nelem, size_t size) objc_fatal("Virtual memory exhausted\n"); return res; } - -struct objc_ex_handler __ex_base_handler = {0, 0, 0, 0, 0 }; -struct objc_ex_handler* __ex_last_handler = &__ex_base_handler; - -objc_uncaught_exception_handler _objc_uncaught_exception_handler = 0; - -void -__objc_add_handler(struct objc_ex_handler* hdlr) -{ - hdlr->ex_prev = __ex_last_handler; - __ex_last_handler = hdlr; -} - -void -__objc_remove_handler(struct objc_ex_handler* hdlr) -{ - __ex_last_handler = hdlr->ex_prev; -} - -#ifndef __STRICT_ANSI__ -__volatile -#endif -extern void __objc_raise_error(int code, const void* data1, const void* data2) -{ - if (__ex_last_handler->ex_prev) - { - __ex_last_handler->code = code; - __ex_last_handler->data1 = data1; - __ex_last_handler->data2 = data2; - longjmp (__ex_last_handler->ex_env, 1); - } - else - { - if (_objc_uncaught_exception_handler) - (*_objc_uncaught_exception_handler)(code, data1, data2); - else - { - printf ("uncaught exception: code=%d, data1=%x, data2=%x\n", - code, data1, data2); - abort(); - } - } -} |