Right. You don't want to apply the namespace to *other* headers, just the current file. Those other headers might be designed for inclusion by a C++ program.
On Sun, Sep 11, 2016 at 2:58 PM, Peter Snyder <[email protected]> wrote: > I think this is great too, but I don’t think it’s keeping to the mynewt > coding standard. In particular I think the C++ wrappers are supposed to > appear after other included files and before any file content. For sure > this messes up your script (sorry) but it avoids any potential conflicts > with the included headers. I’m fine being corrected on this (sure would be > easier to automate this work :-). > > Here’s the relevant section from the coding standard < > https://github.com/apache/incubator-mynewt-core/blob/ > master/CODING_STANDARDS.md>: > Header files must contain the following structure: > > Apache License (see above) > #ifdef aliasing, to prevent multiple includes > #include directives for other required header files > #ifdef __cplusplus wrappers to maintain C++ friendly APIs > Contents of the header file > - peter > > > > On Sep 11, 2016, at 12:41 PM, Christopher Collins <[email protected]> > wrote: > > > > On Sun, Sep 11, 2016 at 12:39:27PM -0700, Christopher Collins wrote: > >> Look great to me, thanks! I just have a question - the commit message > >> indicates that two files were not modified: > >> > >> libs/baselibc/src/baselibc_test/unittests.h > >> libs/shell/include/shell/shell_prompt.h > >> > >> Why did you exclude these files? > > > > Er... the commit message also explains why they were excluded [*]. > > Sorry :). > > > > [*] "Because the hack I used looks for normal #include guards for its > place > > to put the C++ ones, and those files don't have any." > >
