Re: GArray conversion



Hey Kuldeep,

2013/4/4 kuldeep dhaka <kuldeepdhaka9 gmail com>:

c-code:

GArray * arr;
gdouble * natural_array;
unsigned int size;

arr = g_array_new (FALSE, FALSE, sizeof (gdouble));

... add values to GArray ....

<store the size of garray in size var>

natural_array = g_array_natural(arr, sizeof(double));

I think
natural_array = (gdouble*)g_array_free(arr, FALSE);
would do what you are asking for.

Christophe


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