[Gdal-dev] Re: DISOWN in ogr.i

Charlie Savage cfis at interserv.com
Mon Apr 10 22:14:24 EDT 2006


Hi Ari,

> There has been three warnings on *DISOWN when generating the Perl 
> bindings. These have come from swig/include/ogr.i. As I understand 
> swig/Perl does not use *DISOWN, so I commented them out for Perl. 

According to the SWIG documentation Perl does support DISOWN - see 
http://www.swig.org/Doc1.3/Perl5.html#Perl5_nn42.  I think this might be 
a newer feature.

In two
> cases my solution for Perl is to use %perlcode and wrap 
> SetGeometryDirectly and AddGeometryDirectly so that they call Perl 
> DISOWN method before the actual method (a hackish solution, I admit).
> 
> The third case is the ExecuteSQL, ReleaseResultSet pair. If I understand 
> correctly, these should always be called in pairs, so the %newobject and 
> *DISOWN in fact cancel each other. I now removed both for Perl, but I 
> think they could be removed for all languages?

Um, maybe.  But DISOWN and %newobject clearly indicate what the 
interface is really doing.  Why would you change them - what's the 
benefit?  It took a fair bit of time to get them right the first time, 
I'm loathe to change them.

Charlie




More information about the Gdal-dev mailing list