Fixed build with clang.

main
theraven 16 years ago
parent baed61c3e6
commit cbf41a1fec

@ -738,16 +738,19 @@ __objc_compute_ivar_offsets (Class class)
* functionality, provide an alternative @interface with all variables * functionality, provide an alternative @interface with all variables
* declared @public. * declared @public.
*/ */
for (i = 0 ; i < class->ivars->ivar_count ; i++) if (class->ivars)
{ {
struct objc_ivar *ivar = &class->ivars->ivar_list[i]; for (i = 0 ; i < class->ivars->ivar_count ; 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; 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;
}
} }
} }
} }

@ -85,7 +85,7 @@ Method_t search_for_method_in_list (MethodList_t list, SEL op);
id nil_method (id, SEL); id nil_method (id, SEL);
/* Given a selector, return the proper forwarding implementation. */ /* Given a selector, return the proper forwarding implementation. */
inline inline static
IMP IMP
__objc_get_forward_imp (id rcv, SEL sel) __objc_get_forward_imp (id rcv, SEL sel)
{ {

Loading…
Cancel
Save