Hi Jeremy, On Sat, May 24, 2008 at 08:15:47PM +0100, Jeremy Henty wrote:
While reviewing nav.c to figure out the reload crash bug I noticed something that seems inconsistent: both Nav_stack_truncate() and Nav_stack_clean() remove items from the navigation stack, yet Nav_stack_truncate() does not free the data it removes and Nav_stack_clean() does. Is this a bug? If not, what haven't I understood?
Nav_stack_truncate() and Nav_stack_insert() are ad-hoc bindings. They're called just in one place of the code. They're not clean well-defined functions of an ADT. This is "your" mistake. :-) I stumbled upon Nav_stack_clean() some time ago, and wondered whether it still serves a clear purpose or if it could be replaced. The nav.c module is asking for a clean ADT, and if you can work on it, it's certainly welcomed. Beware that it's more complex than it looks. Especially the repush code. Nav.c takes care of redirections, reloads, repushes, expects, jumps, pushes, etc. BTW, if it's to be rewritten it'd be good to have the TABs interface in mind. This is, if we end with a clean ADT or object, we could have an array of them, one for each tab, and switch freely among navigation stacks. -- Cheers Jorge.-