From 4f9f2c224e582052a505d09ee0fa381235087cf3 Mon Sep 17 00:00:00 2001 From: CaS Date: Fri, 4 Jul 2003 06:32:14 +0000 Subject: [PATCH] Fix recursion problem git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@17093 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 4 ++++ Source/NSDistantObject.m | 16 ++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/ChangeLog b/ChangeLog index baab929d5..ba86ab0b0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2003-07-04 Richard Frith-Macdonald + + * Source/NSDistantObject.m: Avoid recursion fetching method signature + 2003-07-03 Richard Frith-Macdonald * Source/NSCalendarDate: ([-initWithString:calendarFormat:]) default diff --git a/Source/NSDistantObject.m b/Source/NSDistantObject.m index adec933fc..ad8fa81dc 100644 --- a/Source/NSDistantObject.m +++ b/Source/NSDistantObject.m @@ -791,6 +791,22 @@ enum } return sig; } + /* + * Simlarly, when we fetch a method signature form the remote end, + * we get a proxy, and when we build a local signature we need to + * ask the proxy for its types ... and must avoid recursion again. + */ + if (sel_eq(aSelector, @selector(methodType))) + { + static NSMethodSignature *sig = nil; + + if (sig == nil) + { + sig = [NSMethodSignature signatureWithObjCTypes: "*@:"]; + RETAIN(sig); + } + return sig; + } if (_protocol != nil) {