[Gdal-dev] Re: Fwd: gdal swig interface Band.i Updated

Frank Warmerdam warmerdam at pobox.com
Thu Aug 17 11:14:39 EDT 2006


Daniele Romagnoli wrote:
> Dear Mr. Warmerdam,
> Thank you for the update.
> 
> I quote here an useful comment of Mr. Charlie Savage.
> 
> Mr. Charlie Savage wrote:
> .....
> -------------------------------------------------------------------------------------------------------- 
> 
> However, if you use %apply then you should also clear it after the
> method is defined.
> 
> %apply (int *OUTPUT){int *blockXSize, int *blockYSize}
>   void GetBlockSize(int *blockXSize, int *blockYSize){
>               GDALGetBlockSize(self, blockXSize, blockYSize);
>   }
> %clear (int *blockXSize, int *blockYSize);
> 
> Its probably not that important in this case, but if there happened to
> be another method with the same 2 output parameters then this typemap
> would be applied again (sometimes you want that, sometimes you don't).

Daniel,

That's why I changed the parameter names to pnBlockXSize and pnBlockYSize
since anything using the prefix pn would mean the arguments are pointers to
single integer values and the applied OUTPUT logic would presumably apply.

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




More information about the Gdal-dev mailing list