Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2003:
[Freeciv-Dev] Re: (PR#6410) make helpdata.c use speclist
Home

[Freeciv-Dev] Re: (PR#6410) make helpdata.c use speclist

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: per@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#6410) make helpdata.c use speclist
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 6 Oct 2003 10:02:06 -0700
Reply-to: rt@xxxxxxxxxxxxxx

Per I. Mathisen wrote:
> One of the last holdouts of direct use of the genlist, the ugly helpdata
> list implementation, is here transformed into a speclist. Much nicer.

>    check_help_nodes_init();
> -  pitem = ITERATOR_PTR(help_nodes_iterator);
> -  ITERATOR_NEXT(help_nodes_iterator);
> +  pitem = help_nodes_iterator->dataptr;
> +  help_nodes_iterator = help_nodes_iterator->next;

It seems very bad to access the fields of the list directly.  For one 
thing, this gets rid of type checking, right?  Aren't there functions to 
retrieve this data?

jason




[Prev in Thread] Current Thread [Next in Thread]