summaryrefslogtreecommitdiffstats
path: root/doc/Namespace.3
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2021-04-25 10:56:32 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2021-04-25 10:56:32 (GMT)
commit2453c29945269ab4734362d7613c187d3e6e8fbb (patch)
tree77821fc1dbeb54aa2be647250bc7cef1a712d7a7 /doc/Namespace.3
parent8a32e272a433d0d1c70502e85cff49464d5e50ce (diff)
downloadtcl-2453c29945269ab4734362d7613c187d3e6e8fbb.zip
tcl-2453c29945269ab4734362d7613c187d3e6e8fbb.tar.gz
tcl-2453c29945269ab4734362d7613c187d3e6e8fbb.tar.bz2
Documenting our reference count management
Diffstat (limited to 'doc/Namespace.3')
-rw-r--r--doc/Namespace.316
1 files changed, 14 insertions, 2 deletions
diff --git a/doc/Namespace.3 b/doc/Namespace.3
index a037442..49b772c 100644
--- a/doc/Namespace.3
+++ b/doc/Namespace.3
@@ -46,10 +46,10 @@ Tcl_Command
\fBTcl_FindCommand\fR(\fIinterp, name, contextNsPtr, flags\fR)
.sp
Tcl_Obj *
-\fBTcl_GetNamespaceUnknownHandler(\fIinterp, nsPtr\fR)
+\fBTcl_GetNamespaceUnknownHandler\fR(\fIinterp, nsPtr\fR)
.sp
int
-\fBTcl_SetNamespaceUnknownHandler(\fIinterp, nsPtr, handlerPtr\fR)
+\fBTcl_SetNamespaceUnknownHandler\fR(\fIinterp, nsPtr, handlerPtr\fR)
.SH ARGUMENTS
.AS Tcl_NamespaceDeleteProc allowOverwrite in/out
.AP Tcl_Interp *interp in/out
@@ -159,6 +159,18 @@ for the namespace, or NULL if none is set.
\fBTcl_SetNamespaceUnknownHandler\fR sets the unknown command handler for
the namespace. If \fIhandlerPtr\fR is NULL, then the handler is reset to
its default.
+.SH "REFERENCE COUNT MANAGEMENT"
+.PP
+The \fIobjPtr\fR argument to \fBTcl_AppendExportList\fR should be an
+unshared object, as it will be modified by this function. The
+reference count of \fIobjPtr\fR will not be altered.
+.PP
+\fBTcl_GetNamespaceUnknownHandler\fR returns a possibly shared value.
+Its reference count should be incremented if the value is to be
+retained.
+.PP
+The \fIhandlerPtr\fR argument to \fBTcl_SetNamespaceUnknownHandler\fR
+will have its reference count incremented if it is a non-empty list.
.SH "SEE ALSO"
Tcl_CreateCommand(3), Tcl_ListObjAppendList(3), Tcl_SetVar(3)
.SH KEYWORDS