Fossil SCM
Do not free the Tcl result (or interp) prior to setting the TH1 result.
Commit
0299d484fc77aafad74837a5f15a4ff43b848bef
Parent
9773d5966f6a584…
2 files changed
+2
-2
+3
-2
+2
-2
| --- src/th_tcl.c | ||
| +++ src/th_tcl.c | ||
| @@ -108,12 +108,12 @@ | ||
| 108 | 108 | Tcl_DecrRefCount(objv[i-1]); |
| 109 | 109 | } |
| 110 | 110 | ckfree((char *)objv); |
| 111 | 111 | } |
| 112 | 112 | zResult = Tcl_GetStringFromObj(resultObjPtr, &nResult); |
| 113 | - Tcl_DecrRefCount(resultObjPtr); | |
| 114 | 113 | Th_SetResult(interp, zResult, nResult); |
| 114 | + Tcl_DecrRefCount(resultObjPtr); | |
| 115 | 115 | return rc; |
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | /* |
| 119 | 119 | ** Syntax: |
| @@ -161,12 +161,12 @@ | ||
| 161 | 161 | Tcl_DecrRefCount(objv[i-1]); |
| 162 | 162 | } |
| 163 | 163 | ckfree((char *)objv); |
| 164 | 164 | objPtr = Tcl_GetObjResult(tclInterp); |
| 165 | 165 | zResult = Tcl_GetStringFromObj(objPtr, &nResult); |
| 166 | - Tcl_Release((ClientData)tclInterp); | |
| 167 | 166 | Th_SetResult(interp, zResult, nResult); |
| 167 | + Tcl_Release((ClientData)tclInterp); | |
| 168 | 168 | return rc; |
| 169 | 169 | } |
| 170 | 170 | |
| 171 | 171 | /* |
| 172 | 172 | ** Syntax: |
| 173 | 173 |
| --- src/th_tcl.c | |
| +++ src/th_tcl.c | |
| @@ -108,12 +108,12 @@ | |
| 108 | Tcl_DecrRefCount(objv[i-1]); |
| 109 | } |
| 110 | ckfree((char *)objv); |
| 111 | } |
| 112 | zResult = Tcl_GetStringFromObj(resultObjPtr, &nResult); |
| 113 | Tcl_DecrRefCount(resultObjPtr); |
| 114 | Th_SetResult(interp, zResult, nResult); |
| 115 | return rc; |
| 116 | } |
| 117 | |
| 118 | /* |
| 119 | ** Syntax: |
| @@ -161,12 +161,12 @@ | |
| 161 | Tcl_DecrRefCount(objv[i-1]); |
| 162 | } |
| 163 | ckfree((char *)objv); |
| 164 | objPtr = Tcl_GetObjResult(tclInterp); |
| 165 | zResult = Tcl_GetStringFromObj(objPtr, &nResult); |
| 166 | Tcl_Release((ClientData)tclInterp); |
| 167 | Th_SetResult(interp, zResult, nResult); |
| 168 | return rc; |
| 169 | } |
| 170 | |
| 171 | /* |
| 172 | ** Syntax: |
| 173 |
| --- src/th_tcl.c | |
| +++ src/th_tcl.c | |
| @@ -108,12 +108,12 @@ | |
| 108 | Tcl_DecrRefCount(objv[i-1]); |
| 109 | } |
| 110 | ckfree((char *)objv); |
| 111 | } |
| 112 | zResult = Tcl_GetStringFromObj(resultObjPtr, &nResult); |
| 113 | Th_SetResult(interp, zResult, nResult); |
| 114 | Tcl_DecrRefCount(resultObjPtr); |
| 115 | return rc; |
| 116 | } |
| 117 | |
| 118 | /* |
| 119 | ** Syntax: |
| @@ -161,12 +161,12 @@ | |
| 161 | Tcl_DecrRefCount(objv[i-1]); |
| 162 | } |
| 163 | ckfree((char *)objv); |
| 164 | objPtr = Tcl_GetObjResult(tclInterp); |
| 165 | zResult = Tcl_GetStringFromObj(objPtr, &nResult); |
| 166 | Th_SetResult(interp, zResult, nResult); |
| 167 | Tcl_Release((ClientData)tclInterp); |
| 168 | return rc; |
| 169 | } |
| 170 | |
| 171 | /* |
| 172 | ** Syntax: |
| 173 |
+3
-2
| --- win/Makefile.mingw.mistachkin | ||
| +++ win/Makefile.mingw.mistachkin | ||
| @@ -61,11 +61,11 @@ | ||
| 61 | 61 | TCC += -L$(TCLDIR)/lib -I$(TCLDIR)/include |
| 62 | 62 | endif |
| 63 | 63 | |
| 64 | 64 | # With HTTPS support |
| 65 | 65 | ifdef FOSSIL_ENABLE_SSL |
| 66 | -TCC += -static -DFOSSIL_ENABLE_SSL=1 | |
| 66 | +TCC += -DFOSSIL_ENABLE_SSL=1 | |
| 67 | 67 | endif |
| 68 | 68 | |
| 69 | 69 | # With Tcl support |
| 70 | 70 | ifdef FOSSIL_ENABLE_TCL |
| 71 | 71 | TCC += -DFOSSIL_ENABLE_TCL=1 |
| @@ -75,11 +75,12 @@ | ||
| 75 | 75 | # to link against the Z-Lib compression library. There are no |
| 76 | 76 | # other dependencies. We sometimes add the -static option here |
| 77 | 77 | # so that we can build a static executable that will run in a |
| 78 | 78 | # chroot jail. |
| 79 | 79 | # |
| 80 | -#LIB = -lz -lws2_32 | |
| 80 | +LIB = -static | |
| 81 | + | |
| 81 | 82 | # OpenSSL: |
| 82 | 83 | ifdef FOSSIL_ENABLE_SSL |
| 83 | 84 | LIB += -lssl -lcrypto -lgdi32 |
| 84 | 85 | endif |
| 85 | 86 | LIB += -lmingwex -lz -lws2_32 |
| 86 | 87 |
| --- win/Makefile.mingw.mistachkin | |
| +++ win/Makefile.mingw.mistachkin | |
| @@ -61,11 +61,11 @@ | |
| 61 | TCC += -L$(TCLDIR)/lib -I$(TCLDIR)/include |
| 62 | endif |
| 63 | |
| 64 | # With HTTPS support |
| 65 | ifdef FOSSIL_ENABLE_SSL |
| 66 | TCC += -static -DFOSSIL_ENABLE_SSL=1 |
| 67 | endif |
| 68 | |
| 69 | # With Tcl support |
| 70 | ifdef FOSSIL_ENABLE_TCL |
| 71 | TCC += -DFOSSIL_ENABLE_TCL=1 |
| @@ -75,11 +75,12 @@ | |
| 75 | # to link against the Z-Lib compression library. There are no |
| 76 | # other dependencies. We sometimes add the -static option here |
| 77 | # so that we can build a static executable that will run in a |
| 78 | # chroot jail. |
| 79 | # |
| 80 | #LIB = -lz -lws2_32 |
| 81 | # OpenSSL: |
| 82 | ifdef FOSSIL_ENABLE_SSL |
| 83 | LIB += -lssl -lcrypto -lgdi32 |
| 84 | endif |
| 85 | LIB += -lmingwex -lz -lws2_32 |
| 86 |
| --- win/Makefile.mingw.mistachkin | |
| +++ win/Makefile.mingw.mistachkin | |
| @@ -61,11 +61,11 @@ | |
| 61 | TCC += -L$(TCLDIR)/lib -I$(TCLDIR)/include |
| 62 | endif |
| 63 | |
| 64 | # With HTTPS support |
| 65 | ifdef FOSSIL_ENABLE_SSL |
| 66 | TCC += -DFOSSIL_ENABLE_SSL=1 |
| 67 | endif |
| 68 | |
| 69 | # With Tcl support |
| 70 | ifdef FOSSIL_ENABLE_TCL |
| 71 | TCC += -DFOSSIL_ENABLE_TCL=1 |
| @@ -75,11 +75,12 @@ | |
| 75 | # to link against the Z-Lib compression library. There are no |
| 76 | # other dependencies. We sometimes add the -static option here |
| 77 | # so that we can build a static executable that will run in a |
| 78 | # chroot jail. |
| 79 | # |
| 80 | LIB = -static |
| 81 | |
| 82 | # OpenSSL: |
| 83 | ifdef FOSSIL_ENABLE_SSL |
| 84 | LIB += -lssl -lcrypto -lgdi32 |
| 85 | endif |
| 86 | LIB += -lmingwex -lz -lws2_32 |
| 87 |