+1 for 1, 2 and 3. Not sure about 4. I am fine with using the macros and prefacing the element names but not sure what other issues this might cause so I will abstain.
Will > On Feb 16, 2016, at 1:13 PM, Sterling Hughes <[email protected]> wrote: > > >> 1. The STATS_SECT_START and STATS_SECT_END macros just define a struct; >> they don't create an instance. Generally, these macros would be used >> in a header file so that source files can have access to the struct >> definition. >> >> 2. The addition of a STATS_SECT_DECL macro. This macro would be used in >> two places: >> * In source files to instantiate a stats struct. >> * In header files to expose an extern declaration of a stats >> instance. >> >> 3. As a consequence of the above two points: the names of struct >> instances are no longer auto-generated. The user needs to specify the >> exact name. All macros which derive the instance name from the struct >> name are changed: now they just accept the instance name directly. >> > > > +1 > > >> 4. Remove the "s" which prefaces the name of each stat field in a >> statistics struct. By doing this, the STATS_SECT_VAR, STATS_INC, and >> STATS_INCN macros can be removed. >> > > -1 > > I think we want these macros used everywhere: they allow us more flexibility > to refactor this, and there is a relatively well defined access mechanism for > stats. > > Sterling
