-- Forwarded message --
From: Federico Giménez Nieto fgime...@coit.es
Date: 2011/9/10
Subject:
To: cont...@bugs.debian.org
tags 629204 patch
thanks
--
Federico Giménez Nieto
fgime...@coit.es
2011-08-17 Federico Gimenez Nieto fgime...@coit.es
* Modified function calls for Modern GNU Objective-C runtime API following
changes of source at http://svn.gna.org/viewcvs/gnustep/libs/gdl2/trunk/
Index: gnustep-dl2-0.12.0/EOControl/EOFaultHandler.m
===
--- gnustep-dl2-0.12.0.orig/EOControl/EOFaultHandler.m 2011-08-22 11:51:35.0 +0200
+++ gnustep-dl2-0.12.0/EOControl/EOFaultHandler.m 2011-08-22 12:52:50.0 +0200
@@ -123,7 +123,7 @@
{
Class class;
- for (class = _targetClass; class != Nil; class = class_get_super_class(class))
+ for (class = _targetClass; class != Nil; class = class_getSuperclass(class))
{
if (class == aclass)
return YES;
@@ -141,11 +141,15 @@
- (BOOL)conformsToProtocol: (Protocol *)protocol
forFault: (id)fault
{
+
+ return class_conformsToProtocol(_targetClass, protocol);
+
+ /*
int i;
struct objc_protocol_list *proto_list;
Class class;
- for(class = _targetClass; class != Nil; class = class_get_super_class(class))
+ for(class = _targetClass; class != Nil; class = class_getSuperclass(class))
{
for (proto_list =
((struct objc_class *)_targetClass)-class_pointer-protocols;
@@ -160,6 +164,7 @@
}
return NO;
+ */
}
- (BOOL)respondsToSelector: (SEL)sel
Index: gnustep-dl2-0.12.0/EOControl/EOFault.m
===
--- gnustep-dl2-0.12.0.orig/EOControl/EOFault.m 2011-08-22 12:59:10.0 +0200
+++ gnustep-dl2-0.12.0/EOControl/EOFault.m 2011-08-23 08:27:31.0 +0200
@@ -77,22 +77,8 @@
+ (void)initialize
{
- // Must be here as initialize is called for each root class
- // without asking if it responds to it !
if (EOFaultClass == NULL)
{
- GSMethod nsfwd = GSGetMethod([NSObject class],
-@selector(forward::),
-YES,NO);
- if (nsfwd != NULL)
-{
- GSMethod eofwd = GSGetMethod(self,
-@selector(forward::),
-YES,NO);
- eofwd-method_imp = nsfwd-method_imp;
- GSFlushMethodCacheForClass(self);
-}
-
EOFaultClass = [EOFault class];
}
}
@@ -171,7 +157,7 @@
/*
* Since 'self' is an class, get_imp() will get the instance method.
*/
- return get_imp((Class)self, selector);
+ return class_getMethodImplementation((Class)self, selector);
}
// Fault class methods
@@ -311,43 +297,12 @@
- (BOOL)conformsToProtocol: (Protocol *)protocol
{
- int i;
- struct objc_protocol_list* protos;
- Class class, sClass;
-
- class = [_handler targetClass];
-
- for (protos = class-protocols; protos; protos = protos-next)
-{
- for (i = 0; i protos-count; i++)
- if ([protos-list[i] conformsTo: protocol])
- return YES;
-}
-
- sClass = [class superclass];
-
- if (sClass)
-return [sClass conformsToProtocol: protocol];
- else
-return NO;
+ return class_conformsToProtocol([_handler targetClass], protocol);
}
- (BOOL)respondsToSelector: (SEL)selector
{
- Class class;
- BOOL respondsToSelector;
-
- NSDebugFLLog(@gsdb, @START self=%p, self);
-
- class = [_handler targetClass];
- NSDebugFLLog(@gsdb, @class=%@ selector=%@, class,
- NSStringFromSelector(selector));
-
- respondsToSelector
-= (GSGetMethod(class, selector, YES, YES) != (GSMethod)0);
- NSDebugFLLog(@gsdb, @STOP self=%p, self);
-
- return respondsToSelector;
+ return class_respondsToSelector([_handler targetClass], selector);
}
- (NSMethodSignature *)methodSignatureForSelector: (SEL)selector
Index: gnustep-dl2-0.12.0/EOControl/EODebug.m
===
--- gnustep-dl2-0.12.0.orig/EOControl/EODebug.m 2011-08-23 08:36:52.0 +0200
+++ gnustep-dl2-0.12.0/EOControl/EODebug.m 2011-08-23 10:58:09.0 +0200
@@ -127,14 +127,14 @@
{
Class *pvalue = (Class*)_value;
return [NSString stringWithFormat: @Class:%s,
- class_get_class_name(*pvalue)];
+ class_getName(*pvalue)];
}
break;
case _C_SEL:
{
SEL *pvalue = (SEL*)_value;
return [NSString stringWithFormat: @SEL:%s,
- sel_get_name(*pvalue)];
+ sel_getName(*pvalue)];
}
break;
case _C_CHR:
@@ -322,19 +322,20 @@
{
if (ivar object deep = 0)
{
- void *pValue = ((void*)object) + ivar-ivar_offset;
- NSString *pType = TypeToNSString(ivar-ivar_type);
- NSString *pIVar = IVarInString(ivar-ivar_type,pValue);
-
+ void *pValue = ((void*)object) + ivar_getOffset(ivar);
+ char *type = ivar_getTypeEncoding(ivar);
+ NSString *pType = TypeToNSString(type);
+ NSString *pIVar =