g_slist and const
- From: Asbjørn <asbgpe online no>
- To: gtk-devel-list gnome org
- Subject: g_slist and const
- Date: Fri, 9 Mar 2007 19:46:59 +0100
I'm tightning my code and i wonder why some of the g_slist functions don't use
"const".
gint g_slist_position (GSList *list, GSList *llink);
gint g_slist_index (GSList *list, gconstpointer data);
guint g_slist_length (GSList *list);
Should be like this:
gint g_slist_position (const GSList *list, const GSList *llink);
gint g_slist_index (const GSList *list, gconstpointer data);
guint g_slist_length (const GSList *list);
I have changed the code and glib compile without any problems.
The change will be harmless, and the code will more readable.
The documentation have to be changed then !
Same for g_list,,, and maybe many other place in glib.
Havn't got time to investigate the rest of the code.
Rgds
Asbjorn
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]