Re: g_list_append
- From: "Maher Awamy" <muhri muhri net>
- To: "Sreenidhi.B.G" <nidhi ncoretech com>, "gtk-app-devel-list gnome org" <gtk-app-devel-list gnome org>
- Subject: Re: g_list_append
- Date: 28 Dec 2001 16:36:58 CST
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]