Package: sqlite / 2.8.17-15

09-tcl8.6_compat.patch Patch series | download
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
Description: Don't access Tcl internal variables directly
 Use API function to get result from Tcl.
Author: Laszlo Boszormenyi (GCS) <gcs@debian.org>
Last-Update: 2018-08-21

---

--- sqlite-2.8.17.orig/src/tclsqlite.c
+++ sqlite-2.8.17/src/tclsqlite.c
@@ -1242,7 +1242,7 @@ int TCLSH_MAIN(int argc, char **argv){
     }
     if( Tcl_EvalFile(interp, argv[1])!=TCL_OK ){
       const char *zInfo = Tcl_GetVar(interp, "errorInfo", TCL_GLOBAL_ONLY);
-      if( zInfo==0 ) zInfo = interp->result;
+      if( zInfo==0 ) zInfo = Tcl_GetStringResult(interp);
       fprintf(stderr,"%s: %s\n", *argv, zInfo);
       return TCL_ERROR;
     }
@@ -1280,7 +1280,7 @@ int main(int argc, char **argv){
   }
   if( Tcl_GlobalEval(interp, zAnalysis)!=TCL_OK ){
     const char *zInfo = Tcl_GetVar(interp, "errorInfo", TCL_GLOBAL_ONLY);
-    if( zInfo==0 ) zInfo = interp->result;
+    if( zInfo==0 ) zInfo = Tcl_GetStringResult(interp);
     fprintf(stderr,"%s: %s\n", *argv, zInfo);
     return TCL_ERROR;
   }
--- sqlite-2.8.17.orig/src/md5.c
+++ sqlite-2.8.17/src/md5.c
@@ -305,7 +305,7 @@ static int md5_cmd(void*cd, Tcl_Interp *
   MD5Init(&ctx);
   MD5Update(&ctx, (unsigned char*)argv[1], (unsigned)strlen(argv[1]));
   MD5Final(digest, &ctx);
-  DigestToBase16(digest, interp->result);
+  DigestToBase16(digest, Tcl_GetStringResult(interp));
   return TCL_OK;
 }
 
@@ -339,7 +339,7 @@ static int md5file_cmd(void*cd, Tcl_Inte
   }
   fclose(in);
   MD5Final(digest, &ctx);
-  DigestToBase16(digest, interp->result);
+  DigestToBase16(digest, Tcl_GetStringResult(interp));
   return TCL_OK;
 }