On Sat, 2009-04-18 at 03:33 +0800, Bean wrote: > Hi, > > One of the advantage of nested function is to use local variables. > Without it, we would need to pass them as global variable, or add > custom data pointer in many of the iterate function, which would make > the code a lot uglier IMO.
Indeed, I tried to get rid on nested functions in fs/ext2.c, and it requires more changes than I expected. However, my impression is that everything can be written nicely with more effort. Some arguments could be put into the structures we need to pass, so the number of arguments doesn't increase. We should probably try to avoid adding new nested functions in the meantime. -- Regards, Pavel Roskin _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel