This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Replace libdw nested functions with macros, part 1.


> Does the new walk_children look right to you?
> That style is similar to what I would use when I need to factor out code in
> large C functions. It should be general enough to replace all nested
> functions in elfutils.

The general style of factoring out the shared locals into by-reference
parameters of the subfunction is right.  How much to put into a bespoke
local struct and how much to do with multiple parameters is a case by case
decision about what feels most clean and concise in the source code.

I don't favor typedefs for private types like that.  Just use 'struct foo'.
Some of the indentation choices and other style nits didn't look quite
right off hand, but those are trivia.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]