From cbf41a1fec8d2554f3092aa87da03fdb8d89337c Mon Sep 17 00:00:00 2001 From: theraven Date: Tue, 17 Nov 2009 23:28:58 +0000 Subject: [PATCH] Fixed build with clang. --- init.c | 19 +++++++++++-------- sendmsg.c | 2 +- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/init.c b/init.c index f0970c5..a2ea6da 100644 --- a/init.c +++ b/init.c @@ -738,16 +738,19 @@ __objc_compute_ivar_offsets (Class class) * functionality, provide an alternative @interface with all variables * declared @public. */ - for (i = 0 ; i < class->ivars->ivar_count ; i++) + if (class->ivars) { - struct objc_ivar *ivar = &class->ivars->ivar_list[i]; - ivar->ivar_offset += ivar_start; - /* If we're using the new ABI then we also set up the faster ivar - * offset variables. - */ - if (CLS_ISNEW_ABI(class)) + for (i = 0 ; i < class->ivars->ivar_count ; i++) { - *(class->ivar_offsets[i]) = ivar->ivar_offset; + struct objc_ivar *ivar = &class->ivars->ivar_list[i]; + ivar->ivar_offset += ivar_start; + /* If we're using the new ABI then we also set up the faster ivar + * offset variables. + */ + if (CLS_ISNEW_ABI(class)) + { + *(class->ivar_offsets[i]) = ivar->ivar_offset; + } } } } diff --git a/sendmsg.c b/sendmsg.c index f1fb7cc..6a9701a 100644 --- a/sendmsg.c +++ b/sendmsg.c @@ -85,7 +85,7 @@ Method_t search_for_method_in_list (MethodList_t list, SEL op); id nil_method (id, SEL); /* Given a selector, return the proper forwarding implementation. */ -inline +inline static IMP __objc_get_forward_imp (id rcv, SEL sel) {