Index: src/OFIntrospection.m ================================================================== --- src/OFIntrospection.m +++ src/OFIntrospection.m @@ -116,10 +116,28 @@ @throw e; } return self; } +#elif defined(OF_OLD_GNU_RUNTIME) +- _initWithIvar: (Ivar_t)ivar +{ + self = [super init]; + + @try { + name = [[OFString alloc] + initWithCString: ivar->ivar_name + encoding: OF_STRING_ENCODING_ASCII]; + offset = ivar->ivar_offset; + typeEncoding = ivar->ivar_type; + } @catch (id e) { + [self release]; + @throw e; + } + + return self; +} #endif - (void)dealloc { [name release]; @@ -229,10 +247,20 @@ for (i = 0; i < methodList->method_count; i++) [instanceMethods addObject: [[[OFMethod alloc] _initWithMethod: &methodList->method_list[i]] autorelease]]; } + + if (class->ivars != NULL) { + int i; + + for (i = 0; i < class->ivars->ivar_count; i++) + [instanceVariables addObject: + [[[OFInstanceVariable alloc] + _initWithIvar: class->ivars->ivar_list + i] + autorelease]]; + } #endif [classMethods makeImmutable]; [instanceMethods makeImmutable]; [instanceVariables makeImmutable];