Re: help needed with array out arguments



On Mon, 1 Apr 2002, Diego Sevilla Ruiz wrote:

> > server:
> > 	skel_Test_ITest_foo (Test_Numbers_slice *out_array)
> > 	{
> > 		out_array = Test_Numbers__alloc ();
> > 		// Fill out_array
> > 	}
> > 
> 
> Server code is fine.

How can that work? when the skel is entered, out_array points to garbage
(or 0, in case the marshaller nulls it beforehand). The skel changes
out_array to point to the return value of __alloc, which is somewhere in
heap. However, this new pointer value never gets back to the skel
marshaller (i.e. the function that called skel_Test_ITest_foo) since
arguments are passed by value and not by reference.

I'm sure I'm missing something obvious here -- but my mind races and I
cannot figure out how this could work.


-- 
   .--= ULLA! =---------------------.   `We are not here to give users what
   \     http://cactus.rulez.org     \   they want'  -- RMS, at GUADEC 2001
    `---= cactus@cactus.rulez.org =---'
Cigány triatlon: leszalad a strandra, úszik egyet, és hazabiciklizik.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]