blob: 5a805931ca31911b1e0bac07205be2bc6393d85d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
generic/tcldom.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/generic/tcldom.c b/generic/tcldom.c
index 91d98c9..0f024b3 100644
--- a/generic/tcldom.c
+++ b/generic/tcldom.c
@@ -5933,8 +5933,13 @@ int tcldom_EvalLocked (
ret = Tcl_EvalObj(interp, objv[2]);
if (ret == TCL_ERROR) {
char msg[64 + TCL_INTEGER_SPACE];
+ #if TCL_MAJOR_VERSION <=8 && TCL_MINOR_VERSION < 6
sprintf(msg, "\n (\"%s %s\" body line %d)", Tcl_GetString(objv[0]),
Tcl_GetString(objv[1]), interp->errorLine);
+ #else
+ sprintf(msg, "\n (\"%s %s\" body line %d)", Tcl_GetString(objv[0]),
+ Tcl_GetString(objv[1]), Tcl_GetErrorLine(interp));
+ #endif
Tcl_AddErrorInfo(interp, msg);
}
|