summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authordgp <dgp@noemail.net>2006-06-06 20:07:34 (GMT)
committerdgp <dgp@noemail.net>2006-06-06 20:07:34 (GMT)
commitfee6a6f0f2e8ee0a3660b7bc3933609bd3580501 (patch)
tree1594f47804904cc9f03e7d2276d609b082117bd6 /doc
parent09e0e2fed324fd72845f98849a95ed8cfeb3b08c (diff)
downloadtcl-fee6a6f0f2e8ee0a3660b7bc3933609bd3580501.zip
tcl-fee6a6f0f2e8ee0a3660b7bc3933609bd3580501.tar.gz
tcl-fee6a6f0f2e8ee0a3660b7bc3933609bd3580501.tar.bz2
* doc/GetStdChan.3: Added recommendation that each call to
Tcl_SetStdChannel() be accompanied by a call to Tcl_RegisterChannel(). FossilOrigin-Name: d79ba117f3e1b3d3023fa87806f1d9d00d8bd9bc
Diffstat (limited to 'doc')
-rw-r--r--doc/GetStdChan.312
1 files changed, 11 insertions, 1 deletions
diff --git a/doc/GetStdChan.3 b/doc/GetStdChan.3
index 09c65d9..031f0db 100644
--- a/doc/GetStdChan.3
+++ b/doc/GetStdChan.3
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: GetStdChan.3,v 1.4 2001/12/10 15:50:46 dgp Exp $
+'\" RCS: @(#) $Id: GetStdChan.3,v 1.4.4.1 2006/06/06 20:07:36 dgp Exp $
'\"
.so man.macros
.TH Tcl_GetStdChannel 3 7.5 Tcl "Tcl Library Procedures"
@@ -53,6 +53,16 @@ by calling \fBTcl_SetStdChannel\fR with a new channel or NULL in the
\fBTcl_Close\fR, then the corresponding standard channel will automatically be
set to NULL.
.PP
+If a non-NULL value for \fIchannel\fR is passed to \fBTcl_SetStdChannel\fR,
+then that same value should be passed to \fBTcl_RegisterChannel\fR, like so:
+.CS
+Tcl_RegisterChannel(NULL, channel);
+.CE
+This is a workaround for a misfeature in \fBTcl_SetStdChannel\fR that it
+fails to do some reference counting housekeeping. This misfeature cannot
+be corrected without contradicting the assumptions of some existing
+code that calls \fBTcl_SetStdChannel\fR.
+.PP
If \fBTcl_GetStdChannel\fR is called before \fBTcl_SetStdChannel\fR, Tcl will
construct a new channel to wrap the appropriate platform-specific standard
file handle. If \fBTcl_SetStdChannel\fR is called before