From 06040ad95ff04c36982b51c47cc5f1d2c43242cc Mon Sep 17 00:00:00 2001 From: mccallum Date: Tue, 4 Mar 1997 15:53:52 +0000 Subject: [PATCH] ([Connection -forwardForProxy:selector:argFrame:]): In nested function decoder(), always set IP to -1 after sending it -dismiss, i.e. in both cases. Fix the assertion at the bottom so that IP is allowed to be nil, which will be the case when mframe_build_return() never calls decoder(), which will happen when we are returning void. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2220 72102866-910b-0410-8b05-ffd578937521 --- Source/Connection.m | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Source/Connection.m b/Source/Connection.m index 52e73d7a7..67ee867a6 100644 --- a/Source/Connection.m +++ b/Source/Connection.m @@ -592,7 +592,7 @@ static int messages_received_count; if (ip) { /* this must be here to avoid trashing alloca'ed retframe */ [ip dismiss]; - ip = nil; + ip = (id)-1; } return; } @@ -614,6 +614,7 @@ static int messages_received_count; [ip decodeObjectAt: &exc withName: NULL]; [ip dismiss]; + ip = (id)-1; /* xxx Is there anything else to clean up in dissect_method_return()? */ [exc raise]; @@ -630,8 +631,12 @@ static int messages_received_count; retframe = mframe_build_return (argframe, type, out_parameters, decoder); - /* Make sure we processed all arguments, and dismissed the IP. */ - assert (ip == (id)-1); + /* Make sure we processed all arguments, and dismissed the IP. + IP is always set to -1 after being dismissed; the only places + this is done is in this function DECODER(). IP will be nil + if mframe_build_return() never called DECODER(), i.e. when + we are just returning (void).*/ + assert (ip == (id)-1 || ip == nil); return retframe; } }