[omniORB] Sequence of Sequence causes client compiler errors!!!

David Morgenlender dmorgen@alum.mit.edu
Thu, 28 Jan 1999 20:19:31 GMT


Sai-Lai,

>This is a quick one.
>
>The signature of the argument expected is TestResultsList*&. It expects =
you
>to pass a TestResultsList* and on return a sequence is allocated on the
>heap by the callee and its pointer is written into your argument.
>
>Try this:
>
>Tests::TestResultsList* seqResults;
>
>INTERFACE_TESTS-> Test(seqResults);
>
>// Remember to free the sequence later.
>// Or define seqResults as Tests::TestResultsList_var.
>
>As to why the this is so, check the C++ mapping spec Table 24.

Thanks.  That was a VERY fast response!

This solves the problem.  But, I'm mystified, because I could've sworn I =
had
tried exactly that! =20

IAE, I still don't understand why this compiles:

	Tests::TestResultsList* seqResults;
	INTERFACE_TESTS-> Test(seqResults);

and this does not:

	Tests::TestResultsList seqResults;
	INTERFACE_TESTS-> Test(&seqResults);

Clearly, they are very different in terms of execution.  But from the
compilation point of view, in each case the argument is
"Tests::TestResultsList*".  What am I missing?

BTW, I had already realized I needed to allocate the sequence on the heap=
 & I
was going to make the change as soon as I had solved this problem ... too=
 bad I
didn't try fixing that first!

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D
Dave Morgenlender
e-mail: dmorgen@alum.mit.edu
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D