summarylogtreecommitdiffstats
path: root/nam-1.15-tcl86.patch
blob: 9b804d7a20eab60f9cea6ad4bc950cca870d8453 (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
32
33
34
35
36
37
38
39
40
diff --git a/main.cc b/main.cc
index 7276dfc..5ab3262 100644
--- a/main.cc
+++ b/main.cc
@@ -222,7 +222,7 @@ extern "C" char version[];
 
 static int cmd_version(ClientData , Tcl_Interp* tcl, int , CONST84 char **)
 {
-	tcl->result = version;
+	Tcl_SetResult(tcl, version, TCL_STATIC);
 	return (TCL_OK);
 }
 
@@ -331,7 +331,7 @@ main(int argc, char **argv) {
 
 	Tcl_Interp *interp = Tcl_CreateInterp();
 	if (Tcl_Init(interp) == TCL_ERROR) {
-		printf("%s\n", interp->result);
+		printf("%s\n", Tcl_GetStringResult(interp));
 		abort();
 	}
 
@@ -350,7 +350,7 @@ main(int argc, char **argv) {
 #endif
 
 	if (Otcl_Init(interp) == TCL_ERROR) {
-		printf("%s\n", interp->result);
+		printf("%s\n", Tcl_GetStringResult(interp));
 		abort();
 	}
 #ifdef HAVE_LIBTCLDBG
@@ -372,7 +372,7 @@ main(int argc, char **argv) {
 	if (Tk_Init(tcl.interp()) == TCL_OK)
 		tk = Tk_MainWindow(tcl.interp());
 	if (tk == 0) {
-		fprintf(stderr, "nam: %s\n", interp->result);
+		fprintf(stderr, "nam: %s\n", Tcl_GetStringResult(interp));
 		exit(1);
 	}
 	tcl.tkmain(tk);