List:MySQL++« Previous MessageNext Message »
From:Warren Young Date:August 20 2004 7:36pm
Subject:Re: dll problems with borland 6
View as plain text  
Totte Karlsson wrote:
> in convert1.hh and defs.hh
> #include <defs.hh> and <mysql.h>
> 
> was changed to
> #include "defs.hh" and "mysql.h" respectively.
 >
> There seems to be a general use of <> when including non system headers
> troughout the library. I think they should all be changed into "" where
> appropriate.

The C++ Standard does not define a difference in the meaning of "" vs <> 
#includes.  Their behaviors are both implementation dependent.

It is traditional, however, for <> to look in all places in the standard 
INCLUDE path, plus any directories mentioned in -I flags.  "" 
traditionally looks first in the same directory as as the compilation 
unit being built (i.e. the *.cc file).

Since MySQL++ headers are generally located in a directory you specify 
with -I, or in one of the standard system include directories (e.g. 
/usr/local/include), I believe <> is appropriate in the header files.

"" is appropriate in the .cc files, since they are #including files from 
the same directory.

> Should it not just simply read (will make it compile)
>         ReturnType* operator -> () const {return &((*d)[i]);}

operator-> should indeed return a pointer to the object.  Fixed.

> (I find .hh unconventional for a user header file).

So do I, but I'm not ready to make such wholesale changes to the code 
style at this time.

Does the file name ending affect your ability to use the library?  No? 
So leave it alone.

> The #def __USLC__ results in a memory leak. 

I think the right thing to do here is to just remove that code path. 
__USLC__ is defined by the System V C++ compiler, and I wouldn't be the 
tiniest bit surprised if MySQL++ doesn't build under it any more anyway. 
  It's not the most compliant compiler in the world.  Indeed, those 
ifdefs are there to work around pre-Standard iostream implementation 
details.

Thank you for your efforts.  These changes will appear in the next version.
Thread
dll problems with borland 6Totte Karlsson19 Aug
  • Re: dll problems with borland 6Warren Young19 Aug
  • Re: dll problems with borland 6Totte Karlsson19 Aug
    • Re: dll problems with borland 6Warren Young19 Aug
  • Re: dll problems with borland 6Totte Karlsson20 Aug
    • Re: dll problems with borland 6Warren Young20 Aug
  • Re: dll problems with borland 6Totte Karlsson20 Aug
    • Re: dll problems with borland 6Warren Young20 Aug
  • Re: mysql++ on sourceforgeSteffen Neumann26 Oct
  • Re: mysql++ on sourceforgePaolo Brandoli26 Oct