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

Ari Jolma ari.jolma at tkk.fi
Tue Apr 11 02:24:35 EDT 2006


Charlie Savage kirjoitti:
> 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.

The DISOWN method, which swig generates for Perl, is for the Perl 
programmer to use, and does not automate the handing of the object from 
Perl to C. This is an unnecessary extra task for him/her so I'd like the 
bindings to do it, as it assumably does for the other languages. Now a 
(not "the") solution (with swig 1.2.25 at least) is to write %perlcode 
into the bindings to explicitly call DISOWN in these few cases 
(SetGeometryDirectly etc).

Regarding the files in the CVS and swig version, I'd think that would be 
a task for the PSC to decide ;-)

Just a few thoughts: Are people developing GDAL in Windows? Couldn't 
there be a nightly make dist for those who need a bleeding edge version? 
The Fedora 5 still has swig 1.3.24, installing 1.3.29 is an extra step, 
which is not needed for Perl bindings I believe.

Thanks for the replies.

Ari

-- 
Prof. Ari Jolma
Kartografia ja Geoinformatiikka / Cartography and Geoinformatics
Teknillinen Korkeakoulu / Helsinki University of Technology
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