tags 629215 + patch
thanks
Please find attached a proposed patch. Builds fine, but I haven't
tested the app yet.
---
talksoup.app-1.0alpha-32-g55b4d4e.orig/Output/GNUstepOutput/Misc/NSObjectAdditions.m
+++
talksoup.app-1.0alpha-32-g55b4d4e/Output/GNUstepOutput/Misc/NSObjectAdditions.m
@@ -30,38 +30,24 @@
@implementation NSObject (Introspection)
+ (NSArray *)methodsDefinedForClass
{
- struct objc_method_list *list;
-#ifdef __APPLE__
- void *iterator;
-#endif
+ Method *methods;
+ unsigned int numMethods;
Class class;
int z;
- int y;
SEL sel;
NSMutableArray *array = AUTORELEASE([NSMutableArray new]);
class = [self class];
-#ifdef __APPLE__
- iterator = 0;
- while ((list = class_nextMethodList(class, &iterator)))
+ methods = class_copyMethodList(class, &numMethods);
{
-#else
- for (list = class->methods; list != NULL; list=list->method_next)
- {
-#endif
- y = list->method_count;
- for (z = 0; z < y; z++)
+ for (z = 0; z < numMethods; z++)
{
- sel = list->method_list[z].method_name;
-#ifdef __APPLE__
- [array addObject: AUTORELEASE([[NSString alloc]
initWithUTF8String:
- (char *)sel])];
-#else
- [array addObject: NSStringFromSelector(sel)];
-#endif
+ sel = method_getName(methods[z]);
+ [array addObject: NSStringFromSelector(sel)];
}
}
+ free(methods);
return [NSArray arrayWithArray: array];
}