Move declarations around (patch by Phillipe Roussel)

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/dbuskit/trunk@35097 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Niels Grewe 2012-04-21 11:20:15 +00:00
parent d0d44a9224
commit 5280155b02
2 changed files with 11 additions and 4 deletions

View File

@ -1,3 +1,7 @@
2012-04-21 Phillipe Roussel <p.o.roussel@free.fr>
* Source/NSConnection+DBus.m: Move declarations before statements.
2012-03-25 Niels Grewe <niels.grewe@halbordnung.de>
* Headers/NSConnection+DBus.h

View File

@ -49,20 +49,23 @@ static IMP _DKNSConnectionSetRootObject;
@implementation NSConnection (DBusKit)
+ (void)load
{
Method oldRootProxyMethod, newRootProxyMethod;
Method oldSetRootObjectMethod, newSetRootObjectMethod;
/*
* We do some devious patching and replace some method implementations in
* NSConnection with the ones from this category.
*/
rootProxySel = @selector(rootProxy);
setRootObjectSel = @selector(setRootObject:);
Method oldRootProxyMethod =
oldRootProxyMethod =
class_getInstanceMethod(objc_getClass("NSConnection"), rootProxySel);
Method newRootProxyMethod =
newRootProxyMethod =
class_getInstanceMethod(objc_getClass("NSConnection"),
@selector(_DKRootProxy));
Method oldSetRootObjectMethod =
oldSetRootObjectMethod =
class_getInstanceMethod(objc_getClass("NSConnection"), setRootObjectSel);
Method newSetRootObjectMethod =
newSetRootObjectMethod =
class_getInstanceMethod(objc_getClass("NSConnection"),
@selector(_DKSetRootObject:));
_DKNSConnectionRootProxy = method_getImplementation(oldRootProxyMethod);