Re: An 'oldie' question... GtkCList anyone?
- From: "Tomas Soltys" <tomas soltys range-software com>
- To: "John Coppens" <john jcoppens com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: An 'oldie' question... GtkCList anyone?
- Date: Tue, 27 Jan 2009 15:53:03 +0100 (CET)
Hi,
try to declare str as:
char *str[4];
Regards,
Tomas
Hello people.
In the process of converting an old program from mSQL to MySQL, I found a
couple of potential traps and optimized a couple of functions. I now have
a problem with adding lines into a GtkCList using gtk_clist_append. The
code is like this:
char *bff, str[4];
bff = strdup("abc|def|ghi|etc"); Just to show bff has to freed later
splitline(bff, str); This puts pointers into str to each of
the substrings (at the start and
after each |, converting them to \0 )
gtk_clist_append(clist, str); Add the line,
g_free(bff);
It looks as if the g_free happens before the append, because gibberish
appears on the screen.
Is there a way to assure the append is finished before the g_free?
John
_______________________________________________
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]