Typo alert:

On 30 Nov 2009, at 12:29, Gary V. Vaughan wrote:
> if you are proposing that SListCallback functions passed to
> slist_remove should always return SList *, then that does seem like a
> worthy addition to me. In that case, the following is cleaner, and
> goes some way towards preventing misuse of the API by having the find
> callback return something from the innards of an element (which is,
> by the way still a valid use-case for other SListCallback occurences):
> 
> libltd/libltdl/slist.h:
> typedef SList *  SListRemoveCallback   (SList *item, void *userdata);
> ...
> LT_SCOPE void * slist_remove    (SList **phead, SListRemoveCallback *find,
>                                 void *matchdata);

Of course that should have said:

LT_SCOPE SList * slist_remove...

> libltdl/slist.c:
> SList *
> slist_remove (SList **phead, SListRemoveCallback *find, void *matchdata)
> {
>  SList *stale = 0;
>  SList *result = 0;
> 
>  ...rest of slist_remove is untouched...
> }

Cheers,
    Gary
-- 
Gary V. Vaughan (g...@gnu.org)


Reply via email to