[Gdal-dev] Testing arguments in the swig-bindings

Ari Jolma ari.jolma at tkk.fi
Tue Aug 28 15:37:21 EDT 2007


Frank Warmerdam kirjoitti:
> Ari Jolma wrote:
>> -- MajorObject.SetDescription
>
> Ari,
>
> For the many string arguments that are required to be non-NULL,
> can we have a swig typemap for "non-null-string" arguments
> to catch this?

hmm, probably yes

>
>> -- Band.ComputeBandStats
>>
>> setting nSampleStep == 0 causes an eternal loop
>
> The C++ ComputeBandStats() code should validate this
> parameter and issue a runtime error for dangerous values.

I'll post a ticket of this

>
>> -- OGR::Layer.CreateField
>>
>> segfault if poField == NULL
>
> Isn't this sort of problem handled by the object-null testing
> that was put in place?

apparently not, ogrlayer.cpp:454 would need a VALIDATE_POINTER, I'll 
make a ticket of that too

Ari

>
> Best regards,


-- 
Prof. Ari Jolma
Geoinformaatio- ja paikannustekniikka / Geoinformation and positioning
Teknillinen Korkeakoulu / Helsinki University of Technology
tel: +358 9 451 3886 address: POBox 1200, 02015 TKK, Finland
Email: ari.jolma at tkk.fi URL: http://www.tkk.fi/~jolma





More information about the Gdal-dev mailing list