[gdal-dev] Should we use boolean type at the SWIG interface?
Frank Warmerdam
warmerdam at pobox.com
Sun Jul 13 14:46:00 EDT 2008
Tamas Szekeres wrote:
> Or simply
>
> bool TestCapability (const char *cap) {
> return (OGR_Dr_TestCapability(self, cap) > 0);
> }
>
>
> 2008/7/13 Tamas Szekeres <szekerest at gmail.com>:
>> Frank,
>>
>> I'd rather not to change the API as I've suggested before because many
>> existing code may rely on it. By using this change the existing
>> scripts should use the !=0 suffix in the conditions and this change
>> may be confusing.
>>
>> What I would propose now is to change the related code according to
>> the following example:
>>
>> bool TestCapability (const char *cap) {
>> return OGR_Dr_TestCapability(self, cap) > 0? true: false;
>> }
>>
>> How about this way?
Tamas,
This is acceptable.
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