Re: g_list_append
- From: "Sreenidhi.B.G" <nidhi ncoretech com>
- To: Maher Awamy <muhri muhri net>
- Cc: "gtk-app-devel-list gnome org" <gtk-app-devel-list gnome org>
- Subject: Re: g_list_append
- Date: Fri, 28 Dec 2001 19:04:15 +0530
thanks,
this works
-sreenidhi,
Maher Awamy wrote:
Most probably you are appending non-allocated data that is gone after your
function exits, do a
my_list = g_slist_append(my_list, g_strdup(string));
and remmeber to free the strings when you dont need them anymore.
Maher
On Fri, 28 Dec 2001 18:46:59 +0530, Sreenidhi.B.G said:
Hi all,
I'm using g_list_append to append some data (strings) to a glist but
when I print the list, it contains junk, and it seems to work then a
constant char string ("Hello WOrld" ) is appended,
can you suggest me something
-regards,
sreenidhi
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
--
http://www.muhri.net -- muhri muhri net
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]