[Gdal-dev] SWIG / TestCapability / Ruby

s duclos sylvain_duclos at yahoo.com
Sun Oct 2 12:14:35 EDT 2005


Nightmare are made of these 

In "Code Complete" Steve McConnell (p. 369) use:

#define TRUE (1==1)
#define FALSE (!TRUE)

So your a bit more abstract.

C99 (and C++) has true/false already and bool type


The fun start when mixing things:
_Bool/bool/BOOL/../true/True/TRUE/etc.


Sylvain.



--- Frank Warmerdam <warmerdam at pobox.com> wrote:

> On 10/1/05, Ari Jolma <ari.jolma at tkk.fi> wrote:
> > Charlie Savage kirjoitti:
> >
> > >
> > > I would like to change the SWIG wrapper code so
> that all the
> > > testcapability methods return booleans.  I think
> this is ok, since the
> > > bindings are built using SWIG's C++ mode, so
> boolean is a supported
> > > data type.  That way I don't have to put in a
> separate mapping for
> > > these methods just in the Ruby bindings.
> >
> >
> > Seems ok to me also. Note that there might be
> other methods too subject
> > to this change, e.g. int GDALDataTypeIsComplex(
> GDALDataType ); in gdal.i
> 
> Guys,
> 
> I think this is a reasonable idea too.  Note that I
> deliberately avoid
> use of the boolean type in my code due to nightmares
> in the past
> with generically named boolean types and conflicts
> in their
> definition in different packages.
> 
> Best regards,
> --
>
---------------------------------------+--------------------------------------
> I set the clouds in motion - turn up   | Frank
> Warmerdam, warmerdam at pobox.com
> light and sound - activate the windows |
> http://pobox.com/~warmerdam
> and watch the world go round - Rush    | Geospatial
> Programmer for Rent
> 
> _______________________________________________
> Gdal-dev mailing list
> Gdal-dev at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/gdal-dev
> 



		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com



More information about the Gdal-dev mailing list