MantisBT - VTK
View Issue Details
0007822VTK(No Category)public2008-10-16 17:102008-10-21 17:08
Adam Williamson 
Sebastien Barre 
normalmajoralways
closedfixed 
 
 
0007822: Use of deprecated interp->result makes VTK un-buildable on Tcl/Tk 8.6
The use of interp->result has been deprecated in Tcl for many years, and with 8.6 they're finally making it not work by default. Using this method will result in an error when building against Tcl/Tk 8.6 unless you do #define USE_INTERP_RESULT before including tcl.h - that, however, is a hack intended to aid migration, the expectation is that the code should be fixed. For Tcl/Tk 9.0 it will be made completely impossible to use interp->result.
VTK uses it in three files: VTK/Common/vtkTclUtil.cxx , VTK/Rendering/vtkTkRenderWidget.cxx and VTK/Rendering/vtkTkImageViewerWidget.cxx . Unfortunately I'm not a hacker so I can't provide an exact patch and be confident it's correct, but I can give some pointers. This is TIP 0000330: http://www.tcl.tk/cgi-bin/tct/tip/330.html [^] . The correct method is to use Tcl_GetStringResult if you're trying to read the result, and Tcl_SetStringResult if you're trying to set it.

The files in Render use it like this:

self->Interp->result

in multiple places, all very similar. vtkTclUtil.cxx uses it like this:

sprintf(temps,"vtk bad argument, type conversion failed for object %s.\nCould not type convert %s which is of type %s, to type %s.\n", name, name, i->result, result_type);

hope that's enough information to fix it. Thanks!
No tags attached.
Issue History
2008-10-16 17:10Adam WilliamsonNew Issue
2008-10-16 17:11Adam WilliamsonNote Added: 0013896
2008-10-21 17:07Sebastien BarreStatusbacklog => tabled
2008-10-21 17:07Sebastien BarreAssigned To => Sebastien Barre
2008-10-21 17:08Sebastien BarreNote Added: 0013918
2008-10-21 17:08Sebastien BarreStatustabled => closed
2008-10-21 17:08Sebastien BarreResolutionopen => fixed
2011-06-16 13:11Zack GalbreathCategory => (No Category)

Notes
(0013896)
Adam Williamson   
2008-10-16 17:11   
Correction: Tcl_SetResult , not Tcl_SetStringResult .
(0013918)
Sebastien Barre   
2008-10-21 17:08   
Fixed, thanks for the report.
Email to follow on the VTK user list