Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Compatibility with Tcl 8.6 - Beginning with 8.6, interp->errorLine

isn't public visible anymore (TIP 330).
  • Loading branch information...
commit 3dd529139d2f44bb9ecfdcddd27b3d6a8df5ff41 1 parent fa99be7
rolf authored
Showing with 9 additions and 1 deletion.
  1. +8 −0 generic/dom.h
  2. +1 −1  generic/tcldom.c
View
8 generic/dom.h
@@ -94,6 +94,14 @@
#endif
/*
+ * Beginning with 8.6, interp->errorLine isn't public visible anymore
+ * (TIP 330)
+ */
+#if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION < 6)
+# define Tcl_GetErrorLine(interp) (interp)->errorLine
+#endif
+
+/*
* Starting with Tcl 8.2 the Tcl_Panic() is defined properly
* over the stubs table.
* Also, we have a proper Tcl_GetString() shortcut afterwards.
View
2  generic/tcldom.c
@@ -5934,7 +5934,7 @@ int tcldom_EvalLocked (
if (ret == TCL_ERROR) {
char msg[64 + TCL_INTEGER_SPACE];
sprintf(msg, "\n (\"%s %s\" body line %d)", Tcl_GetString(objv[0]),
- Tcl_GetString(objv[1]), interp->errorLine);
+ Tcl_GetString(objv[1]), Tcl_GetErrorLine(interp));
Tcl_AddErrorInfo(interp, msg);
}
Please sign in to comment.
Something went wrong with that request. Please try again.