summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-12-10 20:54:49 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-12-10 20:54:49 (GMT)
commitaaf8665696cd7b0d91922cf047daf8e0eb29816e (patch)
tree155d0247e71240908708605203ad917c1faf9d96
parente4dd07e73542f12fbf267871ea7ea57b1f2e935e (diff)
parent15f02f424cbc25390850f6be03592853eab1fa8b (diff)
downloadtcl-aaf8665696cd7b0d91922cf047daf8e0eb29816e.zip
tcl-aaf8665696cd7b0d91922cf047daf8e0eb29816e.tar.gz
tcl-aaf8665696cd7b0d91922cf047daf8e0eb29816e.tar.bz2
merge trunk
-rw-r--r--ChangeLog11
-rw-r--r--doc/expr.n16
-rw-r--r--generic/tclIO.c2
-rw-r--r--generic/tclStubLib.c5
-rw-r--r--tests/chan.test2
5 files changed, 30 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 78b31b6..5d4673b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2012-12-09 Alexandre Ferrieux <ferrieux@users.sourceforge.net>
+ * tests/chan.test: Clean up unwanted eofchar side-effect of
+ chan-4.6 leading to a spurious "'" at end of chan.test under
+ certain conditions (see [Bug 3389289] and [Bug 3389251]).
+ * doc/expr.n: [Bug 3594188] Clarifications about commas.
+
+2012-12-08 Alexandre Ferrieux <ferrieux@users.sourceforge.net>
+ * generic/tclIO.c: Fix busyloop at exit under TCL_FINALIZE_ON_EXIT
+ when there are unflushed nonblocking channels. Thanks Miguel for
+ spotting.
+
2012-12-07 Jan Nijtmans <nijtmans@users.sf.net>
* unix/dltest/pkgb.c: Turn pkgb.so into a Tcl8 interoperability test
diff --git a/doc/expr.n b/doc/expr.n
index 6b6e944..48385cf 100644
--- a/doc/expr.n
+++ b/doc/expr.n
@@ -39,9 +39,9 @@ additional operators not found in C.
.SS OPERANDS
.PP
A Tcl expression consists of a combination of operands, operators,
-and parentheses.
+parentheses and commas.
White space may be used between the operands and operators and
-parentheses; it is ignored by the expression's instructions.
+parentheses (or commas); it is ignored by the expression's instructions.
Where possible, operands are interpreted as integer values.
Integer values may be specified in decimal (the normal case), in binary
(if the first two characters of the operand are \fB0b\fR), in octal
@@ -280,6 +280,18 @@ rules for resolving functions in namespaces. Either
current]::tcl::mathfunc::sin\fR will satisfy the request, and others
may as well (depending on the current \fBnamespace path\fR setting).
.PP
+Some mathematical functions have several arguments, separated by commas like in C. Thus:
+.PP
+.CS
+\fBexpr\fR {hypot($x,$y)}
+.CE
+.PP
+ends up as
+.PP
+.CS
+tcl::mathfunc::hypot $x $y
+.CE
+.PP
See the \fBmathfunc\fR(n) manual page for the math functions that are
available by default.
.SS "TYPES, OVERFLOW, AND PRECISION"
diff --git a/generic/tclIO.c b/generic/tclIO.c
index 5bd0e2a..0568d77 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -2472,7 +2472,7 @@ FlushChannel(
* it's a tty channel (dup'ed underneath)
*/
- if (!GotFlag(statePtr, BG_FLUSH_SCHEDULED)) {
+ if (!GotFlag(statePtr, BG_FLUSH_SCHEDULED) && !TclInExit()) {
SetFlag(statePtr, BG_FLUSH_SCHEDULED);
UpdateInterest(chanPtr);
}
diff --git a/generic/tclStubLib.c b/generic/tclStubLib.c
index e48e60b..720d9ef 100644
--- a/generic/tclStubLib.c
+++ b/generic/tclStubLib.c
@@ -79,6 +79,7 @@ TclInitStubs(
int magic)
{
const char *actualVersion = NULL;
+ ClientData pkgData = NULL;
const TclStubs *stubsPtr;
/*
@@ -92,7 +93,7 @@ TclInitStubs(
return NULL;
}
- actualVersion = stubsPtr->tcl_PkgRequireEx(interp, "Tcl", version, 0, NULL);
+ actualVersion = stubsPtr->tcl_PkgRequireEx(interp, "Tcl", version, 0, &pkgData);
if (actualVersion == NULL) {
return NULL;
}
@@ -122,7 +123,7 @@ TclInitStubs(
}
}
}
- tclStubsPtr = stubsPtr;
+ tclStubsPtr = (TclStubs *)pkgData;
if (tclStubsPtr->hooks) {
tclPlatStubsPtr = tclStubsPtr->hooks->tclPlatStubs;
diff --git a/tests/chan.test b/tests/chan.test
index da44ffd..d8390e2 100644
--- a/tests/chan.test
+++ b/tests/chan.test
@@ -61,7 +61,7 @@ test chan-4.5 {chan command: check valid inValue, invalid outValue} -body {
} -returnCodes error -match glob -result {bad value for -eofchar:*}
test chan-4.6 {chan command: check no inValue, valid outValue} -body {
chan configure stdout -eofchar [list {} \x27]
-} -returnCodes ok -result {}
+} -returnCodes ok -result {} -cleanup {chan configure stdout -eofchar [list {} {}]}
test chan-5.1 {chan command: copy subcommand} -body {
chan copy foo