[gdal-dev] Should we use boolean type at the SWIG interface?

Frank Warmerdam warmerdam at pobox.com
Sun Jul 13 13:08:00 EDT 2008


Tamas Szekeres wrote:
> Devs,
> 
> By using boolean type in the SWIG bindings I currently get a number if
> warnings when compiling the generated code:
> http://buildbot.osgeo.org:8500/builders/szekerest-vc71-full/builds/36/steps/csharp-make/logs/stdio
> 
> Since there are no boolean value exposed by the gdal dll I suppose we
> can use integers instead of booleans at the wrappers as well.
> 
> Any objection to relpace 'bool' with 'int' in ogr.i?

Tamas,

I believe it would be simplest to expose boolean results as a int.

I see that the C API already treats the return result of TestCapability()
as an int.  I'm not sure why it was done differently in the swig include
file.

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    | President OSGeo, http://osgeo.org



More information about the gdal-dev mailing list