missing consts in prototypes?



Hi,
why can't i do this:
const char *text = g_strdup("Anything");
GtkWidget *leaf = gtk_tree_item_new_with_label(text);

or

GtkWidget *leaf = gtk_tree_item_new_with_label(text);

Both functions have prototypes to accept gchar *.
Wouldn't it be better to changed that to const gchar* ?

gcc -Wall produces warnings otherwise.

If these functions really change their argument,
you will get a lot of trouble with from
gtk_tree_item_new_with_label("hello").

Thanks,
Martin.

-- 
The early bird gets the worm. If you want something else for       
breakfast, get up later.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]