← Back to team overview

hugin-devs team mailing list archive

Re: [Bug 1195436] [NEW] Scripting interface does not respect const qualifier

 

On 27.06.2013 21:20, Launchpad Bug Tracker wrote:
> tmodes (tmodes) has assigned this bug to you for Hugin:
>
> The script interface does not respect the const qualifier to some (member) functions.
> E.g. Panorama::GetImages returns a const SrcImage. In C++ you can not modify it, but it works in Python. So in the scripting interface also the const qualifier should be respected.
>
> ** Affects: hugin
>       Importance: Undecided
>       Assignee: KFJ (kfj)
>           Status: Confirmed

Well, thanks for assigning me this task, but I fear I won't be able do 
anything about it. Have a look at

http://www.swig.org/Doc2.0/SWIGDocumentation.html#SWIGPlus_const

I don't think making the python interface respect all uses of const is 
an easy task, if at all feasible. If you look at the i-file, you'll see 
that I have very rarely wrapped anything specific, but instead used the 
feed-swig-the-whole-header approach. Going into the details would 
require way more work.

I do think though that the complete state of the Panorama is stored 
before any plugin is called, and so all changes which might lead into 
trouble because const is not honoured can be undone after the plugin's 
run. And if you want to be on the safe side you can always store the 
panorama before the plugin is called.

Kay

-- 
You received this bug notification because you are a member of Hugin
Developers, which is subscribed to Hugin.
https://bugs.launchpad.net/bugs/1195436

Title:
  Scripting interface does not respect const qualifier

Status in Hugin - Panorama Tools GUI:
  Confirmed

Bug description:
  The script interface does not respect the const qualifier to some (member) functions.
  E.g. Panorama::GetImages returns a const SrcImage. In C++ you can not modify it, but it works in Python. So in the scripting interface also the const qualifier should be respected.

To manage notifications about this bug go to:
https://bugs.launchpad.net/hugin/+bug/1195436/+subscriptions


References