/srv/irclogs.ubuntu.com/2008/10/17/#upstart.txt

sadmac2Keybuk: I think I have an idea for the linked list issue16:13
Keybukoh?16:16
sadmac2Keybuk: for cursor objects, why not set the prev pointer to something weird?16:16
sadmac2Keybuk: and then have them keep the real prev value in a 3rd element16:16
sadmac2so in the insert/delete/etc methods if (prev == (void *)0x2) //the real prev is off the end of the structure, and this is a cursor16:17
sadmac2we could even set it NULL, since I think no valid list structure should ever have null pointers16:18
Keybukand have add_after/add know to check for it?16:22
sadmac2those, and possibly a few others16:23
sadmac2it could touch quite a few functions given how drastic a change it is16:23
sadmac2or rather how drastic a departure from the list structure it is16:23
sadmac2but all the information you need to operate on the list is always available16:24
sadmac2the 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 application16:26
=== notting_ is now known as notting

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!