On Sunday 2013-10-27 22:51, markus.hoeni...@mhoenicka.de wrote:
>Jan Engelhardt writes:
> > +typedef struct _dbi_driver *dbi_driver;
>
>If I apply your suggested patch, I receive
>lots of build warnings along the lines of:
>
>dbi_main.c: In function 'dbi_driver_list_r':
>dbi_main.c:302: warning: initialization from incompatible pointer type
>
>The reason appears to be that libdbi does use typedef structs for
>pointers to drivers, connections, results and the like. These are
>defined in dbi-dev.h, e.g.
>
>typedef struct dbi_driver_s {

Oh that is just a naming thing then. Use
        struct dbi_driver_s;
        typedef struct dbi_driver_s *dbi_driver;
then for dbi.h.

>Problem is that dbi-dev.h is not available to dbi.h

That is not actually a problem. dbi.h does not need dbi-dev.h.

>I don't know why this layout was chosen in the
>first place.

Because you do not want to expose the implementation details to library users.
The chosen file layout makes absolute sense.


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Libdbi-drivers-devel mailing list
Libdbi-drivers-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel

Reply via email to