Re: help needed with array out arguments
- From: Michael Meeks <michael ximian com>
- To: ERDI Gergo <cactus cactus rulez org>
- Cc: orbit <orbit-list gnome org>
- Subject: Re: help needed with array out arguments
- Date: 02 Apr 2002 09:01:03 +0100
Hi Gergo,
On Mon, 2002-04-01 at 17:01, ERDI Gergo wrote:
> that's way beyond cryptic. really, I'm only looking for two-three lines of
> code, like (pulled from my butt):
With that table you can construct all the rest of it trivially.
> client:
> Test_Numbers_slice *numbers = 0;
> Test_ITest_foo (numbers);
From memory:
{
int i;
Test_Numbers_slice numbers[20];
Test_ITest_foo (numbers);
for (i = 0; i < 20; i++)
printf ("Output %d", numbers [i]);
}
> server:
> skel_Test_ITest_foo (Test_Numbers_slice *out_array)
> {
> out_array = Test_Numbers__alloc ();
> // Fill out_array
> }
> skel_Test_ITest_foo (Test_Numbers_slice *out_array)
> {
for (i = 0; i < 20; i++)
out_array [i] = i;
> }
> (I'm pretty sure that's not teh good solution, but it illustrates my
> point)
I hope the above clears things up - the aim here is to avoid dynamic
allocation for things that do not need it.
Regards,
Michael.
--
mmeeks@gnu.org <><, Pseudo Engineer, itinerant idiot
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]