Re: why no gtk_tree_iter_new()?



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()

                                        Owen



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