diff options
| author | Joe Mistachkin <joe@mistachkin.com> | 2011-11-18 01:01:37 (GMT) |
|---|---|---|
| committer | Joe Mistachkin <joe@mistachkin.com> | 2011-11-18 01:01:37 (GMT) |
| commit | a0554213466359e567387e20b147fb0a0c74715d (patch) | |
| tree | c9ab5d5351739a71a886d39ff57055f3d327b00d /generic/tclThreadTest.c | |
| parent | 5ce7e5cfc6ac68f473edaef85bd3b4046366288f (diff) | |
| download | tcl-a0554213466359e567387e20b147fb0a0c74715d.zip tcl-a0554213466359e567387e20b147fb0a0c74715d.tar.gz tcl-a0554213466359e567387e20b147fb0a0c74715d.tar.bz2 | |
For [testthread cancel], avoid creating a new Tcl_Obj when the default script cancellation result is desired.
Diffstat (limited to 'generic/tclThreadTest.c')
| -rw-r--r-- | generic/tclThreadTest.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/generic/tclThreadTest.c b/generic/tclThreadTest.c index 3345081..22b5995 100644 --- a/generic/tclThreadTest.c +++ b/generic/tclThreadTest.c @@ -988,7 +988,8 @@ ThreadCancel( Tcl_MutexUnlock(&threadMutex); Tcl_ResetResult(interp); - return Tcl_CancelEval(tsdPtr->interp, Tcl_NewStringObj(result, -1), 0, flags); + return Tcl_CancelEval(tsdPtr->interp, + (result != NULL) ? Tcl_NewStringObj(result, -1) : NULL, 0, flags); } /* |
