This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
> +void \ > +queue_ ## TYPE ## _remove_elem (QUEUE (TYPE) *q, \ > + QUEUE_ITER (TYPE) *iter) \ > +{ \
gdb_assert (q != NULL); gdb_assert (iter != NULL && iter->p != NULL);
> + if (iter->p == q->head || iter->p == q->tail) \ > + { \ > + if (iter->p == q->head) \ > + q->head = iter->p->next; \ > + if (iter->p == q->tail) \ > + q->tail = iter->prev; \ > + } \ > + else \ > + iter->prev->next = iter->p->next; \ > + \
Need to check if q->free_func != NULL and call it on p->data.
-- Yao
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |