Re: why no gtk_tree_iter_new()?



On Thu, 2001-11-01 at 12:36, Murray Cumming wrote:
> I notice that functions such as gtk_tree_store_new()
s/gtk_tree_store_new/gtk_tree_store_append/
> take pointers to
> allocated, but unset, GtkTreeIters, so in gtk-demo/main.c you have to do
> this:
> 
> GtkTreeIter iter;
> ....
> gtk_tree_store_append (GTK_TREE_STORE (model), &iter, NULL);
> 
> 
> Isn't there a risk that someone could end up calling
> gtk_tree_iter_free() on this. And if there is a gtk_tree_iter(),
> shouldn't there be a matching gtk_tree_iter_new(), which could also zero
> the struct memory to avoid undefined behaviour.
> 
> This wouldn't break the API, but would add a function to it. May I?
> 
> -- 
> Murray Cumming
> murrayc usa net
> www.murrayc.com
> 
> _______________________________________________
> gtk-devel-list mailing list
> gtk-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-devel-list
> 
> 
-- 
Murray Cumming
murrayc usa net
www.murrayc.com




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