Re: Proposal for a collection API in glib



> On http://live.gnome.org/MikkelKamstrup/GCollection you will now find
> a sample patch against trunk (rev 5882) implementing GIterable as
> described on the page.

I don't understand why the GType appears in the function call for
g_iter_next(). As I understand it, a GIter will always be used to
iterate on a single object, thus the GType should be a struct member
of its.

Thus you'd have something like the GtkTreeIter:

GIter foo;
foobar_get_iter (foo);
while (g_iter_has_next (foo)) {
  gpointer elt = g_iter_next (foo);
  ...
}


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