View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013177VTK(No Category)public2012-05-15 13:282012-09-02 09:08
ReporterEric Nodwell 
Assigned ToDavid Gobbi 
PrioritylowSeverityminorReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version5.8.0 
Target VersionFixed in Version 
Summary0013177: Python wrapping of argument names beginning with "const" fails
DescriptionPython wrapping of methods in VTK classes that have arguments starting with "const" fail. For example, if one adds this method to a class in vtkMy, it will fail to be Python wrapped:

  virtual int AddConstraint(const char* constraintName);

The work-around is trivial, as simply renaming "constraintName)" to something like "arg_constraintName" will work. However, it is a head-scratcher to figure out in the first place.

This affects versions 5.6 through 5.10, but not 5.4 and earlier.
TagsNo tags attached.
ProjectTBD
Typeincorrect functionality
Attached Files

 Relationships

  Notes
(0028603)
David Gobbi (developer)
2012-05-15 15:06

Thanks for the report. I looked through vtkParse.l to see if there are any bad rules that might cause this. I found this one:

"*"[\r\n\t ]*"const"

This rule catches any "*" followed by "const", even if "const" is part of a longer word. So the wrappers see "const char* constraintName" as "const char* const".

I'll modify the rule so that it only matches if the "const" is not followed by any other alphanumeric characters. The change will be targeted for VTK 6.
(0029102)
David Gobbi (developer)
2012-09-02 09:08

This was addressed by a rewrite of vtkParse.l (commit 4c6f2f79). The fix will be present in VTK 6.

 Issue History
Date Modified Username Field Change
2012-05-15 13:28 Eric Nodwell New Issue
2012-05-15 14:55 David Gobbi Assigned To => David Gobbi
2012-05-15 14:55 David Gobbi Status backlog => tabled
2012-05-15 15:06 David Gobbi Note Added: 0028603
2012-09-02 09:08 David Gobbi Note Added: 0029102
2012-09-02 09:08 David Gobbi Status tabled => closed
2012-09-02 09:08 David Gobbi Resolution open => fixed


Copyright © 2000 - 2018 MantisBT Team