Re: why no gtk_tree_iter_new()?



On Thu, 2001-11-01 at 15:46, Owen Taylor wrote:
> 
> murrayc t-online de (Murray Cumming) writes:
> 
> > I notice that functions such as gtk_tree_store_new() 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?
> 
> Same arguments apply here as for gtk_text_iter_new()

Was that "Yes, and we might need gtk_text_iter_new() too", or "No, we've
already explained this for gtk_text_iter_new()".

-- 
Murray Cumming
murrayc usa net
www.murrayc.com




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