[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gnome-devel-list
Subject:    Re: GArray conversion
From:       Christophe Fergeau <teuf () gnome ! org>
Date:       2013-04-04 16:06:38
Message-ID: CACw48RkqJ8KWqGq2CrV98y97im2EuKL6=m2G1Fni3NW-KetkaQ () mail ! gmail ! com
[Download RAW message or body]


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
_______________________________________________
gnome-devel-list mailing list
gnome-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gnome-devel-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic