Re: GArray conversion
- From: Christophe Fergeau <teuf gnome org>
- To: kuldeep dhaka <kuldeepdhaka9 gmail com>
- Cc: gnome-devel-list gnome org
- Subject: Re: GArray conversion
- Date: Thu, 4 Apr 2013 18:06:38 +0200
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]