gentoo-overlay/gnustep-apps/gorm/files/gorm-1.2.12-objc2_support.patch

71 lines
2.2 KiB
Diff

--- apps/gorm/trunk/GormCore/GormClassManager.m 2010/09/16 04:57:56 31358
+++ apps/gorm/trunk/GormCore/GormClassManager.m 2010/09/16 05:04:00 31359
@@ -690,7 +690,7 @@
}
actions = [self allActionsForClassNamed: className];
- while (actions == nil && (theClass = class_get_super_class(theClass)) != nil
+ while (actions == nil && (theClass = class_getSuperclass(theClass)) != nil
&& theClass != [NSObject class])
{
className = NSStringFromClass(theClass);
@@ -813,7 +813,7 @@
}
outlets = [self allOutletsForClassNamed: className];
- while (outlets == nil && (theClass = class_get_super_class(theClass)) != nil
+ while (outlets == nil && (theClass = class_getSuperclass(theClass)) != nil
&& theClass != [NSObject class])
{
className = NSStringFromClass(theClass);
@@ -885,7 +885,7 @@
if (theClass != nil)
{
- theClass = class_get_super_class(theClass);
+ theClass = class_getSuperclass(theClass);
if (theClass != nil && theClass != [NSObject class])
{
NSString *name;
--- apps/gorm/trunk/GormCore/GormObjectInspector.m 2010/09/16 04:57:56 31358
+++ apps/gorm/trunk/GormCore/GormObjectInspector.m 2010/09/16 05:04:00 31359
@@ -223,17 +223,13 @@
while (c != nil && c != [NSObject class])
{
- struct objc_method_list *mlist = c->methods;
-
- while (mlist != 0)
- {
- struct objc_method *methods = &mlist->method_list[0];
- int count = mlist->method_count;
+ unsigned int count;
+ Method *methods = class_copyMethodList(c, &count);
int i;
for (i = 0; i < count; i++)
{
- SEL sSel = methods[i].method_name;
+ SEL sSel = method_getName(methods[i]);
NSString *set = NSStringFromSelector(sSel);
/*
@@ -246,7 +242,7 @@
&& [sets containsObject: set] == NO)
{
char tmp[[set cStringLength]+1];
- const char *tInfo = methods[i].method_types;
+ const char *tInfo = method_getTypeEncoding(methods[i]);
NSString *type = nil;
NSString *get;
SEL gSel;
@@ -323,8 +319,7 @@
}
}
}
- mlist = mlist->method_next;
- }
+ free(methods);
c = [c superclass];
}
[sets sortUsingSelector: @selector(compare:)];