diff options
author | Kresten Krab Thorup <krab@gcc.gnu.org> | 1994-06-30 16:18:55 +0000 |
---|---|---|
committer | Kresten Krab Thorup <krab@gcc.gnu.org> | 1994-06-30 16:18:55 +0000 |
commit | a39d31bc0c617e5bc7e57e513ba165e00ed46580 (patch) | |
tree | 8fe61c212a5faefb5e2d0f5e09269f407fb13584 /gcc/objc/misc.c | |
parent | 7a1dd323251ccfb83be3b6e5ae9e7ff31ec8a413 (diff) | |
download | gcc-a39d31bc0c617e5bc7e57e513ba165e00ed46580.zip gcc-a39d31bc0c617e5bc7e57e513ba165e00ed46580.tar.gz gcc-a39d31bc0c617e5bc7e57e513ba165e00ed46580.tar.bz2 |
This patch makes selectors in the Objective-C language be pointers to a struct { void *sel_id...
This patch makes selectors in the Objective-C language be pointers
to a struct { void *sel_id, char *sel_types }, where the sel_types
element is the type encoding of the method arguments.
From-SVN: r7622
Diffstat (limited to 'gcc/objc/misc.c')
-rw-r--r-- | gcc/objc/misc.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/gcc/objc/misc.c b/gcc/objc/misc.c index 6b6b342..7137fda 100644 --- a/gcc/objc/misc.c +++ b/gcc/objc/misc.c @@ -30,6 +30,12 @@ void objc_error(id object, const char* fmt, va_list); void (*_objc_error)(id, const char*, va_list) = objc_error; +#ifdef __alpha__ +#include <stdlib.h> +extern int write (int, const char*, int); +extern size_t strlen (const char*); +#endif + void objc_error(id object, const char* fmt, va_list ap) { @@ -40,7 +46,7 @@ objc_error(id object, const char* fmt, va_list ap) volatile void objc_fatal(const char* msg) { - write(2, msg, (size_t)strlen((char*)msg)); + write(2, msg, (int)strlen((const char*)msg)); abort(); } @@ -65,8 +71,12 @@ __objc_xrealloc(void* mem, size_t size) void* __objc_xcalloc(size_t nelem, size_t size) { - void* res = (void*)calloc(nelem, size); +#ifdef __alpha__ + extern bzero (void *, size_t); +#endif + void* res = (void*)malloc(nelem * size); if(!res) objc_fatal("Virtual memory exhausted\n"); + bzero (res, nelem * size); return res; } |