On 22 Nov, 2013, at 03:49 , Rhialto <[email protected]> wrote: > I was thinking of something like this, which breaks the API because the > current TAILQ_PREV takes 'headname' and not 'type' as a parameter: > > #defined TAILQ_PREV(elm, type, field) \ > (char *)(elm->field.tqe_prev) - offsetof(struct type, field)
This doesn't work, unfortunately. Consider what happens when elm is at the head of the list. Dennis Ferguson
