Re: [Libdbi-drivers-devel] Make dbi_result an unspecified struct

2013-10-28 Thread markus . hoenicka
Jan Engelhardt writes:
  Oh that is just a naming thing then. Use
   struct dbi_driver_s;
   typedef struct dbi_driver_s *dbi_driver;
  then for dbi.h.

Yup, that worked like a charm. I've checked in the changes, see
include/dbi/dbi.h.in revision 1.15.

regards,
Markus

-- 
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38

--
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951iu=/4140/ostg.clktrk
___
Libdbi-drivers-devel mailing list
Libdbi-drivers-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel


Re: [Libdbi-drivers-devel] Make dbi_result an unspecified struct

2013-10-27 Thread Jan Engelhardt

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=60135991iu=/4140/ostg.clktrk
___
Libdbi-drivers-devel mailing list
Libdbi-drivers-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel