Minor efficiency improvement

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17098 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2003-07-04 11:05:06 +00:00
parent 82c83b3237
commit caff431de2
2 changed files with 14 additions and 2 deletions

View file

@ -1,3 +1,7 @@
2003-07-04 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSPasteboard.m: Set protocols for proxy objects.
2003-07-03 01:43 Alexander Malmberg <alexander@malmberg.org>
* Source/NSFont.m (getNSFont): Only update the cache when the font

View file

@ -959,8 +959,10 @@ static NSMapTable *mimeMap = NULL;
if (RETAIN((id)the_server) != nil)
{
NSConnection* conn = [(id)the_server connectionForProxy];
NSConnection *conn = [(id)the_server connectionForProxy];
Protocol *p = @protocol(GSPasteboardSvr);
[(id)the_server setProtocolForProxy: p];
[[NSNotificationCenter defaultCenter]
addObserver: self
selector: @selector(_lostServer:)
@ -1107,10 +1109,16 @@ static NSMapTable *mimeMap = NULL;
id<GSPasteboardObj> anObj;
anObj = [[self _pbs] pasteboardWithName: aName];
if (anObj)
if (anObj != nil)
{
NSPasteboard *ret;
if ([(id)anObj isProxy] == YES)
{
Protocol *p = @protocol(GSPasteboardObj);
[(id)anObj setProtocolForProxy: p];
}
ret = [self _pasteboardWithTarget: anObj name: aName];
NS_VALRETURN(ret);
}