|
[16:13] <sadmac2> Keybuk: I think I have an idea for the linked list issue |
|
[16:16] <Keybuk> oh? |
|
[16:16] <sadmac2> Keybuk: for cursor objects, why not set the prev pointer to something weird? |
|
[16:16] <sadmac2> Keybuk: and then have them keep the real prev value in a 3rd element |
|
[16:17] <sadmac2> so in the insert/delete/etc methods if (prev == (void *)0x2) //the real prev is off the end of the structure, and this is a cursor |
|
[16:18] <sadmac2> we could even set it NULL, since I think no valid list structure should ever have null pointers |
|
[16:22] <Keybuk> and have add_after/add know to check for it? |
|
[16:23] <sadmac2> those, and possibly a few others |
|
[16:23] <sadmac2> it could touch quite a few functions given how drastic a change it is |
|
[16:23] <sadmac2> or rather how drastic a departure from the list structure it is |
|
[16:24] <sadmac2> but all the information you need to operate on the list is always available |
|
[16:26] <sadmac2> the other thing we need (and we need this for any cursor-based solution) is an NIH_LIST_PREV and NIH_LIST_NEXT set of macros, since just grabbing the pointers is unreliable from within the linking application |
|
=== notting_ is now known as notting |
|
|