aboutsummaryrefslogtreecommitdiff
path: root/libraries/tDOM/tDOM-tcl8.6-compat.patch
blob: ee6cb85bfef811d376e79dd1295a939bf71e352e (plain)
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
diff -Nur tDOM-0.8.3.orig/generic/dom.h tDOM-0.8.3/generic/dom.h
--- tDOM-0.8.3.orig/generic/dom.h	2013-11-14 21:27:44.677606548 +0700
+++ tDOM-0.8.3/generic/dom.h	2013-11-14 21:28:45.463749065 +0700
@@ -87,6 +87,15 @@
 #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
+
+/*
  * Beginning with 8.4, Tcl API is CONST'ified
  */
 #if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION <= 3)
diff -Nur tDOM-0.8.3.orig/generic/tcldom.c tDOM-0.8.3/generic/tcldom.c
--- tDOM-0.8.3.orig/generic/tcldom.c	2013-11-14 21:27:44.675606577 +0700
+++ tDOM-0.8.3/generic/tcldom.c	2013-11-14 21:30:34.804206653 +0700
@@ -5934,7 +5934,7 @@
     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);
     }