Skip to content

Commit

Permalink
BUG 11810: VTK failed to compile with Tcl 8.6 due to errorLine.
Browse files Browse the repository at this point in the history
The errorLine member of the Tcl interp struct is private in Tcl 8.6.

Change-Id: I8695e4a9853e87e613cdb9b8d0cb5d9b9437531b
  • Loading branch information
dgobbi committed Jan 18, 2013
1 parent c86fcf5 commit 792a060
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions Wrapping/Tcl/vtkTclUtil.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@
#include <string>
#include <vtksys/SystemTools.hxx>

#if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION < 6)
#define vtkTclGetErrorLine(m) (m->errorLine)
#else
#define vtkTclGetErrorLine(m) (Tcl_GetErrorLine(m))
#endif

extern "C"
{
#if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 4)
Expand Down Expand Up @@ -490,13 +496,15 @@ VTKTCL_EXPORT void vtkTclVoidFunc(void *arg)
vtkGenericWarningMacro("Error returned from vtk/tcl callback:\n" <<
arg2->command << endl <<
Tcl_GetVar(arg2->interp,(char *)("errorInfo"),0) <<
" at line number " << arg2->interp->errorLine);
" at line number " <<
vtkTclGetErrorLine(arg2->interp));
}
else
{
vtkGenericWarningMacro("Error returned from vtk/tcl callback:\n" <<
arg2->command << endl <<
" at line number " << arg2->interp->errorLine);
" at line number " <<
vtkTclGetErrorLine(arg2->interp));
}
}
}
Expand Down Expand Up @@ -732,14 +740,15 @@ void vtkTclCommand::Execute(vtkObject *, unsigned long, void *)
vtkGenericWarningMacro("Error returned from vtk/tcl callback:\n" <<
this->StringCommand << endl <<
Tcl_GetVar(this->Interp,(char *)("errorInfo"),0) <<
" at line number " << this->Interp->errorLine);
" at line number " <<
vtkTclGetErrorLine(this->Interp));
}
else
{
vtkGenericWarningMacro("Error returned from vtk/tcl callback:\n" <<
this->StringCommand << endl <<
" at line number " <<
this->Interp->errorLine);
vtkTclGetErrorLine(this->Interp));
}
}
else if (res == -1)
Expand Down

0 comments on commit 792a060

Please sign in to comment.