Re: Simple procedure question
- From: Tristan Van Berkom <vantr touchtunes com>
- To: Michael Hill <mjh rdasys com>
- Cc: Uni <unimatrix 001 ntlworld com>, GTK App Development list <gtk-app-devel-list gnome org>
- Subject: Re: Simple procedure question
- Date: Fri, 14 Feb 2003 12:02:37 -0500
GList *list; <--- == (SIGSEGV || stack/heap corruption) (sorry to point that out)
list = g_list_append(list, "Hello");
list = g_list_append(list, "World!");
Michael Hill wrote:
Well...the first argument to g_list_append() is a pointer to GList
structure. But if you use the code like you have it, you will loose
the head of the list. An example for using a GList would be:
GList *list;
list = g_list_append(list, "Hello");
list = g_list_append(list, "World!");
and so on. There is some good documentation on the GLib at
www.gtk.org. I would suggest checking that out.
Cheers,
Michael
On Fri, 2003-02-14 at 11:42, Uni wrote:
Hi,
I've got a usual callback function:
void button1_clicked (GtkButton *button, gpointer user_data)
{
sortlist();
}
Although I've also got another function, which is home made and I
want something like the following in it:
void sortlist()
{
g_list_append(WHAT GOES HERE,"hello");
}
I'm not quite sure what I put there. The first function is on one .c
file and the second is on a different .c file. Can anybody help me
please?
Thanks very much for your time,
Uni
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]