summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--generic/tkTest.c9
-rw-r--r--tests/defs.tcl41
3 files changed, 8 insertions, 47 deletions
diff --git a/ChangeLog b/ChangeLog
index abe3897..d0791aa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-07-09 Don Porter <dgp@users.sf.net>
+
+ * generic/tkTest.c: Removed unused dependence on TclThread_Init()
+ * tests/defs.tcl: and [testthread]. [Bug 578165, Tcl Bug 531413]
+
2002-07-08 David Gravereaux <davygrvy@pobox.com>
* unix/Makefile.in: Added missing win/lamp.bmp to the dist
diff --git a/generic/tkTest.c b/generic/tkTest.c
index afc882d..d506dce 100644
--- a/generic/tkTest.c
+++ b/generic/tkTest.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkTest.c,v 1.16 2002/01/17 05:13:11 dgp Exp $
+ * RCS: @(#) $Id: tkTest.c,v 1.17 2002/07/09 17:53:54 dgp Exp $
*/
#include "tkInt.h"
@@ -222,7 +222,6 @@ static void TrivialEventProc _ANSI_ARGS_((ClientData clientData,
*/
extern int TkplatformtestInit _ANSI_ARGS_((Tcl_Interp *interp));
-extern int TclThread_Init _ANSI_ARGS_((Tcl_Interp *interp));
#if !(defined(__WIN32__) || defined(MAC_TCL))
#define TkplatformtestInit(x) TCL_OK
@@ -299,12 +298,6 @@ Tktest_Init(interp)
(ClientData) Tk_MainWindow(interp), (Tcl_CmdDeleteProc *) NULL);
#endif
-#ifdef TCL_THREADS
- if (TclThread_Init(interp) != TCL_OK) {
- return TCL_ERROR;
- }
-#endif
-
/*
* Create test image type.
*/
diff --git a/tests/defs.tcl b/tests/defs.tcl
index 1007465..a25fe46 100644
--- a/tests/defs.tcl
+++ b/tests/defs.tcl
@@ -11,7 +11,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: defs.tcl,v 1.10 2002/06/18 08:24:15 dkf Exp $
+# RCS: @(#) $Id: defs.tcl,v 1.11 2002/07/09 17:53:54 dgp Exp $
# Initialize wish shell
@@ -31,7 +31,7 @@ namespace eval tcltest {
set procList [list test cleanupTests dotests saveState restoreState \
normalizeMsg makeFile removeFile makeDirectory removeDirectory \
viewFile bytestring set_iso8859_1_locale restore_locale \
- safeFetch threadReap]
+ safeFetch]
if {[info exists tk_version]} {
lappend procList setupbg dobg bgReady cleanupbg fixfocus
}
@@ -92,12 +92,6 @@ namespace eval tcltest {
array set ::tcltest::skippedBecause {}
- # tests that use thread need to know which is the main thread
-
- variable ::tcltest::mainThread 1
- if {[info commands testthread] != {}} {
- set ::tcltest::mainThread [testthread names]
- }
}
# If there is no "memory" command (because memory debugging isn't
@@ -1063,37 +1057,6 @@ if {[info exists tk_version]} {
}
}
-# threadReap --
-#
-# Kill all threads except for the main thread.
-# Do nothing if testthread is not defined.
-#
-# Arguments:
-# none.
-#
-# Results:
-# Returns the number of existing threads.
-
-if {[info commands testthread] != {}} {
- proc ::tcltest::threadReap {} {
- testthread errorproc ThreadNullError
- while {[llength [testthread names]] > 1} {
- foreach tid [testthread names] {
- if {$tid != $::tcltest::mainThread} {
- catch {testthread send -async $tid {testthread exit}}
- update
- }
- }
- }
- testthread errorproc ThreadError
- return [llength [testthread names]]
- }
-} else {
- proc ::tcltest::threadReap {} {
- return 1
- }
-}
-
# Need to catch the import because it fails if defs.tcl is sourced
# more than once.