mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
Protocol fixes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@17105 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
33c3cfc8c8
commit
ed6f31208f
3 changed files with 98 additions and 4 deletions
29
Tools/gdnc.m
29
Tools/gdnc.m
|
@ -90,6 +90,29 @@ ihandler(int sig)
|
|||
|
||||
#include "gdnc.h"
|
||||
|
||||
/*
|
||||
* The following dummy class is here solely as a workaround for pre 3.3
|
||||
* versions of gcc where protocols didn't work properly unless implemented
|
||||
* in the source where the '@protocol()' directiver is used.
|
||||
*/
|
||||
@interface NSDistributedNotificationCenterDummy : NSObject <GDNCClient>
|
||||
- (oneway void) postNotificationName: (NSString*)name
|
||||
object: (NSString*)object
|
||||
userInfo: (NSData*)info
|
||||
selector: (NSString*)aSelector
|
||||
to: (unsigned long)observer;
|
||||
@end
|
||||
@implementation NSDistributedNotificationCenterDummy
|
||||
- (oneway void) postNotificationName: (NSString*)name
|
||||
object: (NSString*)object
|
||||
userInfo: (NSData*)info
|
||||
selector: (NSString*)aSelector
|
||||
to: (unsigned long)observer
|
||||
{
|
||||
}
|
||||
@end
|
||||
|
||||
|
||||
@interface GDNCNotification : NSObject
|
||||
{
|
||||
@public
|
||||
|
@ -517,6 +540,12 @@ ihandler(int sig)
|
|||
format: @"registration with registered client"];
|
||||
}
|
||||
info = [GDNCClient new];
|
||||
if ([(id)client isProxy] == YES)
|
||||
{
|
||||
Protocol *p = @protocol(GDNCClient);
|
||||
|
||||
[(id)client setProtocolForProxy: p];
|
||||
}
|
||||
info->client = client;
|
||||
NSMapInsert(table, client, info);
|
||||
RELEASE(info);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue