Re: GArray conversion
Christophe Fergeau <[email protected]> Thu, 4 Apr 2013 18:06:38 +0200
| Newsgroups | gmane.comp.gnome.devel |
|---|---|
| Message-ID | <CACw48RkqJ8KWqGq2CrV98y97im2EuKL6=m2G1Fni3NW-KetkaQ@mail.gmail.com> |
Hey Kuldeep, 2013/4/4 kuldeep dhaka <[email protected]>: > > 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