by AncoraImparo on 1/20/13, 1:26 AM with 38 comments
by AncoraImparo on 1/20/13, 2:49 AM
Thanks.
by gosu on 1/20/13, 2:30 AM
I prefer to store next/prev pointers with the data itself, and to use offsetof/containerof to find a pointer to the data struct which contains a given set of next/prev pointers.
One example of such an scheme is the list used in the Linux kernel:
by tptacek on 1/20/13, 2:10 AM
You are, for whatever it's worth, better off defaulting to a variable-length array than to a linked list.
by chj on 1/20/13, 2:26 AM
1. Please align the asterisks properly. It hurts eyes.
2. Access by index?
3. Iterator (callback on each element)
4. use 'init' instead of 'initialize'. Extra typing hurts fingers.
by afhof on 1/20/13, 2:10 AM
by categorykni on 1/20/13, 1:30 AM