summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tclCompile.c4
-rw-r--r--generic/tclDate.c8
-rw-r--r--generic/tclEvent.c2
-rw-r--r--generic/tclInt.h5
-rw-r--r--tests/event.test28
-rw-r--r--tests/info.test17
-rw-r--r--win/tclWinThrd.c11
7 files changed, 57 insertions, 18 deletions
diff --git a/generic/tclCompile.c b/generic/tclCompile.c
index c0b5dcc..c0203dd 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.c
@@ -3239,8 +3239,10 @@ EnterCmdWordData(
TclAdvanceLines(&wordLine, last, tokenPtr->start);
TclAdvanceContinuations(&wordLine, &wordNext,
tokenPtr->start - envPtr->source);
+ /* See Ticket 4b61afd660 */
wwlines[wordIdx] =
- (TclWordKnownAtCompileTime(tokenPtr, NULL) ? wordLine : -1);
+ ((wordIdx == 0) || TclWordKnownAtCompileTime(tokenPtr, NULL))
+ ? wordLine : -1;
ePtr->line[wordIdx] = wordLine;
ePtr->next[wordIdx] = wordNext;
last = tokenPtr->start;
diff --git a/generic/tclDate.c b/generic/tclDate.c
index 6222a8a..e4dd000 100644
--- a/generic/tclDate.c
+++ b/generic/tclDate.c
@@ -359,14 +359,8 @@ typedef short int yytype_int16;
#ifndef YYSIZE_T
# ifdef __SIZE_TYPE__
# define YYSIZE_T __SIZE_TYPE__
-# elif defined size_t
-# define YYSIZE_T size_t
-# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
-# define YYSIZE_T size_t
# else
-# define YYSIZE_T unsigned int
+# define YYSIZE_T size_t
# endif
#endif
diff --git a/generic/tclEvent.c b/generic/tclEvent.c
index 8305410..b0b8188 100644
--- a/generic/tclEvent.c
+++ b/generic/tclEvent.c
@@ -1462,6 +1462,8 @@ VwaitVarProc(
int *donePtr = clientData;
*donePtr = 1;
+ Tcl_UntraceVar(interp, name1, TCL_TRACE_WRITES|TCL_TRACE_UNSETS,
+ VwaitVarProc, clientData);
return NULL;
}
diff --git a/generic/tclInt.h b/generic/tclInt.h
index fa91528..7ea37bb 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -48,9 +48,8 @@
#else
#include <string.h>
#endif
-#if defined(_WIN32)
-#include <crtdefs.h>
-#elif defined(STDC_HEADERS)
+#if defined(STDC_HEADERS) || defined(__STDC__) || defined(__C99__FUNC__) \
+ || defined(__cplusplus) || defined(_MSC_VER)
#include <stddef.h>
#else
typedef int ptrdiff_t;
diff --git a/tests/event.test b/tests/event.test
index 0d1b06c..207c799 100644
--- a/tests/event.test
+++ b/tests/event.test
@@ -583,6 +583,34 @@ test event-11.6 {Tcl_VwaitCmd procedure: round robin scheduling, same source} {
removeFile $test2file
list $x $y $z
} {3 3 done}
+test event-11.7 {Bug 16828b3744} {
+ after idle {
+ set ::t::v 1
+ namespace delete ::t
+ }
+ namespace eval ::t {
+ vwait ::t::v
+ }
+} {}
+test event-11.8 {Bug 16828b3744} -setup {
+ oo::class create A {
+ variable continue
+
+ method start {} {
+ after idle [self] destroy
+
+ set continue 0
+ vwait [namespace current]::continue
+ }
+ destructor {
+ set continue 1
+ }
+ }
+} -body {
+ [A new] start
+} -cleanup {
+ A destroy
+} -result {}
test event-12.1 {Tcl_UpdateCmd procedure} -returnCodes error -body {
update a b
diff --git a/tests/info.test b/tests/info.test
index 3057dd2..e0fddb3 100644
--- a/tests/info.test
+++ b/tests/info.test
@@ -2398,6 +2398,23 @@ test info-33.35 {{*}, literal, simple, bytecompiled} -body {
# -------------------------------------------------------------------------
unset -nocomplain res
+test info-39.0 {Bug 4b61afd660} -setup {
+ proc probe {} {
+ return [dict get [info frame -1] line]
+ }
+ set body {
+ set cmd probe
+ $cmd
+ }
+ proc demo {} $body
+} -body {
+ demo
+} -cleanup {
+ unset -nocomplain body
+ rename demo {}
+ rename probe {}
+} -result 3
+
# cleanup
catch {namespace delete test_ns_info1 test_ns_info2}
::tcltest::cleanupTests
diff --git a/win/tclWinThrd.c b/win/tclWinThrd.c
index 1c9d483..ca26f08 100644
--- a/win/tclWinThrd.c
+++ b/win/tclWinThrd.c
@@ -168,7 +168,6 @@ TclWinThreadStart(
* from TclpThreadCreate */
{
WinThread *winThreadPtr = (WinThread *) lpParameter;
- unsigned int fpmask;
LPTHREAD_START_ROUTINE lpOrigStartAddress;
LPVOID lpOrigParameter;
@@ -176,13 +175,11 @@ TclWinThreadStart(
return TCL_ERROR;
}
- fpmask = _MCW_EM | _MCW_RC | _MCW_PC;
-
-#if defined(_MSC_VER) && _MSC_VER >= 1200
- fpmask |= _MCW_DN;
+ _controlfp(winThreadPtr->fpControl, _MCW_EM | _MCW_RC | 0x03000000 /* _MCW_DN */
+#if !defined(_WIN64)
+ | _MCW_PC
#endif
-
- _controlfp(winThreadPtr->fpControl, fpmask);
+ );
lpOrigStartAddress = winThreadPtr->lpStartAddress;
lpOrigParameter = winThreadPtr->lpParameter;