[snip] > > Is this correct? Did you really want to pass in the address of > > a local variable to o_selection_remove? Or is the right thing to do > > to pass in the address of > > autotext->toplevel->page_current->selection_list? Please advise. > > It should be the adress of selection_list, but I'm wondering what's the > difference between: > GList *selection = autotext->toplevel->page_current->selection_list; > o_selection_remove (&selection, o_slot); > and: > o_selection_remove(&(autotext->toplevel->page_current->selection_list), > o_slot); > > I may be blind, here.
With GLists, if you remove the first item in the list, the pointer to the GList changes (to that of the second item in the list), so you need to pass the address where you are keeping a pointer to the GList permenantly, not a local copy. (Ales tells me the old implementation used a fixed HEAD node to get around that). Peter C. _______________________________________________ geda-dev mailing list [email protected] http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev
