1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
Common/vtkTclUtil.cxx | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/Common/vtkTclUtil.cxx b/Common/vtkTclUtil.cxx
index 390b0a4..2b7bccb 100644
--- a/Common/vtkTclUtil.cxx
+++ b/Common/vtkTclUtil.cxx
@@ -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)
@@ -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));
}
}
}
@@ -723,14 +731,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);
+ " at line number " <<
+ vtkTclGetErrorLine(this->Interp));
}
}
else if (res == -1)
|