On Tue, Mar 9, 2021 at 4:07 PM Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote: > > On Tue, Mar 09, 2021 at 02:26:39PM +0100, Bartosz Golaszewski wrote: > > From: Bartosz Golaszewski <bgolaszewski@xxxxxxxxxxxx> > > > > GPIOD_API is unneccesarily polluting the user-facing headers. There's no > > advantage to having it in public files. Let's make them internal to the > > library. Upcoming modifications will also make GPIOD_BIT() redundant so > > we'll be able to remove all macros unrelated to the main functionality > > from gpiod.h. > > > -libgpiodcxx_la_SOURCES = chip.cpp iter.cpp line.cpp line_bulk.cpp > > +libgpiodcxx_la_SOURCES = chip.cpp internal.h iter.cpp line.cpp line_bulk.cpp > > Don't we have something like _HEADERS ? > _HEADERS is for headers that are installed. Headers for internal use should be defined as part of sources in autotools. > ... > > > +#include "internal.hpp" > > I forgot C++ approximately when I tried it first time :-) > But I'm confused between this and above file name. Do we have *.h and *.hpp > with the same name? > Yes, internal.h is used by the core C library and lives in lib/, internal.hpp is for C++ (it will grow because we'll have to share some symbols between classes in the future with the new API) and lives in bindings/cxx/. Bart > ... > > > -libgpiod_la_SOURCES = core.c helpers.c misc.c uapi/gpio.h > > +libgpiod_la_SOURCES = core.c helpers.c internal.h misc.c uapi/gpio.h > > As above. > > -- > With Best Regards, > Andy Shevchenko > >