summaryrefslogtreecommitdiffstats
path: root/doc/OpenFileChnl.3
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2021-04-25 11:20:35 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2021-04-25 11:20:35 (GMT)
commitb63d1213ed575f5b179c1e9244ec808e2fe69b96 (patch)
tree7f999dfc4a751c45a0e9f69c81a8534e9f022716 /doc/OpenFileChnl.3
parent2453c29945269ab4734362d7613c187d3e6e8fbb (diff)
downloadtcl-b63d1213ed575f5b179c1e9244ec808e2fe69b96.zip
tcl-b63d1213ed575f5b179c1e9244ec808e2fe69b96.tar.gz
tcl-b63d1213ed575f5b179c1e9244ec808e2fe69b96.tar.bz2
Documenting our reference count management
Diffstat (limited to 'doc/OpenFileChnl.3')
-rw-r--r--doc/OpenFileChnl.318
1 files changed, 18 insertions, 0 deletions
diff --git a/doc/OpenFileChnl.3 b/doc/OpenFileChnl.3
index c1d1922..4e42b93 100644
--- a/doc/OpenFileChnl.3
+++ b/doc/OpenFileChnl.3
@@ -641,6 +641,24 @@ the channel was created with \fBTcl_OpenFileChannel\fR,
\fBTcl_OpenCommandChannel\fR, or \fBTcl_MakeFileChannel\fR. Other
channel types may return a different type of handle on Windows
platforms.
+.SH "REFERENCE COUNT MANAGEMENT"
+.PP
+The \fIreadObjPtr\fR argument to \fBTcl_ReadChars\fR must be an unshared
+value; it will be modified by this function. Using the interpreter result for
+this purpose is \fIstrongly\fR not recommended; the preferred pattern is to
+use a new value from \fBTcl_NewObj\fR to receive the data and only to pass it
+to \fBTcl_SetObjResult\fR if this function succeeds.
+.PP
+The \fIlineObjPtr\fR argument to \fBTcl_GetsObj\fR must be an unshared value;
+it will be modified by this function. Using the interpreter result for this
+purpose is \fIstrongly\fR not recommended; the preferred pattern is to use a
+new value from \fBTcl_NewObj\fR to receive the data and only to pass it to
+\fBTcl_SetObjResult\fR if this function succeeds.
+.PP
+The \fIwriteObjPtr\fR argument to \fBTcl_WriteObj\fR should be a value with
+any reference count. This function will not modify the reference count. Using
+the interpreter result without adding an additional reference to it is not
+recommended.
.SH "SEE ALSO"
DString(3), fconfigure(n), filename(n), fopen(3), Tcl_CreateChannel(3)
.SH KEYWORDS