diff options
-rw-r--r-- | ChangeLog | 97 | ||||
-rw-r--r-- | generic/tclThreadTest.c | 30 |
2 files changed, 68 insertions, 59 deletions
@@ -1,22 +1,30 @@ +2009-11-22 Donal K. Fellows <dkf@users.sf.net> + + * generic/tclThreadTest.c (NewTestThread): [Bug 2901803]: Fix small + error in function naming which blocked a threaded test build. + 2009-11-19 Jan Nijtmans <nijtmans@users.sf.net> - * win/Makefile.in: Create tcltest86.dll as dynamic Tcltest package - * generic/tclTest.c: Remove extraneus prototypes, follow-up - * generic/tclTestObj.c: to [Bug 2883850] + * win/Makefile.in: Create tcltest86.dll as dynamic Tcltest + package. + * generic/tclTest.c: Remove extraneous prototypes, follow-up to + * generic/tclTestObj.c: [Bug 2883850] * tests/chanio.test: Test-cases for fixed [Bug 2849797] * tests/io.test: * tests/safe.test: Fix safe-10.1 and safe-10.4 test cases, making - the wrong assumption that Tcltest is a static package. - * generic/tclEncoding.c:Updated freeIntRepProc routines so that they - * generic/tclVar.c: set the typePtr field to NULL so that the - Tcl_Obj is not left in an inconsistent state. [Bug 2857044] - * unix/tcl.m4: [Tcl Patch #2883533] tcl.m4 support for Haiku OS + the wrong assumption that Tcltest is a static + package. + * generic/tclEncoding.c:[Bug 2857044]: Updated freeIntRepProc routines + * generic/tclVar.c: so that they set the typePtr field to NULL so + that the Tcl_Obj is not left in an + inconsistent state. + * unix/tcl.m4: [Patch 2883533]: tcl.m4 support for Haiku OS * unix/configure: autoconf-2.59 2009-11-19 Don Porter <dgp@users.sourceforge.net> - * unix/tclAppInit.c: Repair broken build of the tcltest executable. - * win/tclAppInit.c: [Bug 2883850, 2900542]. + * unix/tclAppInit.c: [Bug 2883850, 2900542]: Repair broken build of + * win/tclAppInit.c: the tcltest executable. 2009-11-19 Donal K. Fellows <dkf@users.sf.net> @@ -49,13 +57,14 @@ 2009-11-18 Jan Nijtmans <nijtmans@users.sf.net> - * doc/CrtChannel.3 Fix [Bug 2849797]: channel name inconsistencies - * generic/tclIORChan.c as suggested by DKF - * generic/tclIO.c minor *** POTENTIAL INCOMPATIBILITY *** because - Tcl_CreateChannel() and its derivatives, now - sometimes ignore their "chanName" argument. + * doc/CrtChannel.3: [Bug 2849797]: Fix channel name inconsistences + * generic/tclIORChan.c: as suggested by DKF. + * generic/tclIO.c: Minor *** POTENTIAL INCOMPATIBILITY *** + because Tcl_CreateChannel() and derivatives + now sometimes ignore their "chanName" + argument. - * generic/tclAsync.c Eliminate various gcc warnings (in -Wextra mode) + * generic/tclAsync.c: Eliminate various gcc warnings (with -Wextra) * generic/tclBasic.c * generic/tclBinary.c * generic/tclCmdAH.c @@ -77,12 +86,12 @@ * win/tclWinConsole.c * win/tclWinNotify.c * win/tclWinReg.c - * library/auto.tcl Eliminate "then" keyword + * library/auto.tcl: Eliminate "then" keyword * library/clock.tcl * library/history.tcl * library/safe.tcl * library/tm.tcl - * library/http/http.tcl Eliminate unnecessary spaces + * library/http/http.tcl: Eliminate unnecessary spaces * library/http1.0/http.tcl * library/msgcat/msgcat.tcl * library/opt/optparse.tcl @@ -93,28 +102,28 @@ 2009-11-17 Andreas Kupries <andreask@activestate.com> - * unix/tclUnixChan.c (TtyParseMode): Partial undo of Donal's tidy- - up from a few days ago (2009-11-9, not in ChangeLog). strchr is - apparently a macro on AIX and reacts badly to pre-processor + * unix/tclUnixChan.c (TtyParseMode): Partial undo of Donal's tidy-up + from a few days ago (2009-11-9, not in ChangeLog). It seems that + strchr is apparently a macro on AIX and reacts badly to pre-processor directives in its arguments. 2009-11-16 Alexandre Ferrieux <ferrieux@users.sourceforge.net> - * generic/tclEncoding.c: (forward port) Fix [Bug 2891556] and improve - * generic/tclTest.c: test to detect similar manifestations in the - * tests/encoding.test: future. Add tcltest support for finalization. + * generic/tclEncoding.c: [Bug 2891556]: Fix and improve test to + * generic/tclTest.c: detect similar manifestations in the future. + * tests/encoding.test: Add tcltest support for finalization. 2009-11-15 Mo DeJong <mdejong@users.sourceforge.net> - * win/tclWinDde.c: Avoid gcc compiler warning by - explicitly casting DdeCreateStringHandle argument. + * win/tclWinDde.c: Avoid gcc compiler warning by explicitly casting + DdeCreateStringHandle argument. 2009-11-12 Andreas Kupries <andreask@activestate.com> - * generic/tclIO.c (CopyData): [Bug 2895565]. Dropped bogosity - * tests/io.test: which used the number of _written_ bytes or - character to update the counters for the read bytes/characters. - New test io-53.11. This is a forward port from the 8.5 branch. + * generic/tclIO.c (CopyData): [Bug 2895565]: Dropped bogosity which + * tests/io.test: used the number of _written_ bytes or character to + update the counters for the read bytes/characters. New test io-53.11. + This is a forward port from the 8.5 branch. 2009-11-11 Don Porter <dgp@users.sourceforge.net> @@ -123,8 +132,8 @@ 2009-11-11 Jan Nijtmans <nijtmans@users.sf.net> - * library/http/http.tcl (http::geturl): [Bug 2891171]: URl - checking too strict when using multiple question marks + * library/http/http.tcl (http::geturl): [Bug 2891171]: URL checking + too strict when using multiple question marks. * tests/http.test * library/http/pkgIndex.tcl: Bump to http 2.8.2 * unix/Makefile.in: @@ -143,19 +152,17 @@ 000. On Windows7 and Vista we really have no access and these were getting left behind. A few tests were changed to reflect the intent of the test where - setting a directory chmod 000 should prevent any - modification. This restriction was ignored on XP but is honoured - on Vista + setting a directory chmod 000 should prevent any modification. This + restriction was ignored on XP but is honoured on Vista 2009-11-10 Andreas Kupries <andreask@activestate.com> - * generic/tclBasic.c: Plug another leak in TCL_EVAL_DIRECT - evaluation. Forward port from Tcl 8.5 branch, change by Don - Porter. + * generic/tclBasic.c: Plug another leak in TCL_EVAL_DIRECT evaluation. + Forward port from Tcl 8.5 branch, change by Don Porter. - * generic/tclObj.c: Plug memory leak in TclContinuationsEnter(). - [Bug 2895323]. Forward port from Tcl 8.5 branch, change by Don - Porter. + * generic/tclObj.c: [Bug 2895323]: Plug memory leak in + TclContinuationsEnter(). Forward port from Tcl 8.5 branch, change by + Don Porter. 2009-11-09 Stuart Cassoff <stwo@users.sf.net> @@ -165,12 +172,12 @@ * generic/tclBasic.c (TclEvalObjEx): Moved the #280 decrement of refCount for the file path out of the branch after the whole - conditional, closing a memory leak. Added clause on structure type - to prevent seg.faulting. Forward port from valgrinding the Tcl 8.5 + conditional, closing a memory leak. Added clause on structure type to + prevent seg.faulting. Forward port from valgrinding the Tcl 8.5 branch. - * tests/info.test: Resolve ambiguous resolution of variable - "res". Forward port from 8.5 + * tests/info.test: Resolve ambiguous resolution of variable "res". + Forward port from 8.5 2009-11-08 Donal K. Fellows <dkf@users.sf.net> diff --git a/generic/tclThreadTest.c b/generic/tclThreadTest.c index d4a5f92..b5409f2 100644 --- a/generic/tclThreadTest.c +++ b/generic/tclThreadTest.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclThreadTest.c,v 1.32 2009/11/18 23:46:05 nijtmans Exp $ + * RCS: @(#) $Id: tclThreadTest.c,v 1.33 2009/11/23 00:02:51 dkf Exp $ */ #ifndef USE_TCL_STUBS @@ -48,12 +48,13 @@ static Tcl_ThreadDataKey dataKey; * protected by threadMutex. */ -static struct ThreadSpecificData *threadList; +static ThreadSpecificData *threadList; /* * The following bit-values are legal for the "flags" field of the * ThreadSpecificData structure. */ + #define TP_Dying 0x001 /* This thread is being canceled */ /* @@ -63,7 +64,7 @@ static struct ThreadSpecificData *threadList; */ typedef struct ThreadCtrl { - const char *script; /* The Tcl command this thread should + const char *script; /* The Tcl command this thread should * execute */ int flags; /* Initial value of the "flags" field in the * ThreadSpecificData structure for the new @@ -422,7 +423,8 @@ Tcl_ThreadObjCmd( Tcl_WrongNumArgs(interp, 2, objv, NULL); return TCL_ERROR; } - Tcl_SetObjResult(interp, Tcl_NewIntObj(Tcl_DoOneEvent(TCL_ALL_EVENTS | TCL_DONT_WAIT))); + Tcl_SetObjResult(interp, Tcl_NewIntObj( + Tcl_DoOneEvent(TCL_ALL_EVENTS | TCL_DONT_WAIT))); return TCL_OK; } case THREAD_ERRORPROC: { @@ -453,14 +455,13 @@ Tcl_ThreadObjCmd( return TCL_ERROR; } while (1) { - /* - * If the script has been unwound, bail out immediately. This - * does not follow the recommended guidelines for how extensions - * should handle the script cancellation functionality because - * this is not a "normal" extension. Most extensions do not have - * a command that simply enters an infinite Tcl event loop. - * Normal extensions should not specify the TCL_CANCEL_UNWIND when + * If the script has been unwound, bail out immediately. This does + * not follow the recommended guidelines for how extensions should + * handle the script cancellation functionality because this is + * not a "normal" extension. Most extensions do not have a command + * that simply enters an infinite Tcl event loop. Normal + * extensions should not specify the TCL_CANCEL_UNWIND when * calling Tcl_Canceled to check if the command has been canceled. */ @@ -573,7 +574,7 @@ NewTestThread( char *threadEvalScript; /* - * Initialize the interpreter. This should be more general. + * Initialize the interpreter. This should be more general. */ tsdPtr->interp = Tcl_CreateInterp(); @@ -587,7 +588,7 @@ NewTestThread( * use by the new thread. */ - result = Tcl_PackageRequire(tsdPtr->interp, "Tcltest", TCL_VERSION, 1); + result = Tcl_PkgRequire(tsdPtr->interp, "Tcltest", TCL_VERSION, 1); if (result != TCL_OK) { ThreadErrorProc(tsdPtr->interp); } @@ -662,6 +663,7 @@ ThreadErrorProc( const char *errorInfo, *argv[3]; char *script; char buf[TCL_DOUBLE_SPACE+1]; + sprintf(buf, "%ld", (long) Tcl_GetCurrentThread()); errorInfo = Tcl_GetVar(interp, "errorInfo", TCL_GLOBAL_ONLY); @@ -1191,7 +1193,7 @@ ThreadExitProc( const char *msg = "target thread died"; - resultPtr->result = ckalloc(strlen(msg)+1); + resultPtr->result = ckalloc(strlen(msg) + 1); strcpy(resultPtr->result, msg); resultPtr->code = TCL_ERROR; Tcl_ConditionNotify(&resultPtr->done); |