summaryrefslogtreecommitdiffstats
path: root/doc/Namespace.3
diff options
context:
space:
mode:
Diffstat (limited to 'doc/Namespace.3')
-rw-r--r--doc/Namespace.336
1 files changed, 12 insertions, 24 deletions
diff --git a/doc/Namespace.3 b/doc/Namespace.3
index a7e8502..4b37c2b 100644
--- a/doc/Namespace.3
+++ b/doc/Namespace.3
@@ -3,10 +3,10 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
'\" Note that some of these functions do not seem to belong, but they
'\" were all introduced with the same TIP (#139)
-'\"
+'\"
.TH Tcl_Namespace 3 8.5 Tcl "Tcl Library Procedures"
.so man.macros
.BS
@@ -46,10 +46,10 @@ Tcl_Command
\fBTcl_FindCommand\fR(\fIinterp, name, contextNsPtr, flags\fR)
.sp
Tcl_Obj *
-\fBTcl_GetNamespaceUnknownHandler\fR(\fIinterp, nsPtr\fR)
+\fBTcl_GetNamespaceUnknownHandler(\fIinterp, nsPtr\fR)
.sp
int
-\fBTcl_SetNamespaceUnknownHandler\fR(\fIinterp, nsPtr, handlerPtr\fR)
+\fBTcl_SetNamespaceUnknownHandler(\fIinterp, nsPtr, handlerPtr\fR)
.SH ARGUMENTS
.AS Tcl_NamespaceDeleteProc allowOverwrite in/out
.AP Tcl_Interp *interp in/out
@@ -67,7 +67,7 @@ if no such callback is to be performed.
The namespace to be manipulated, or NULL (for other than
\fBTcl_DeleteNamespace\fR) to manipulate the current namespace.
.AP Tcl_Obj *objPtr out
-A reference to an unshared value to which the function output will be
+A reference to an unshared object to which the function output will be
written.
.AP "const char" *pattern in
The glob-style pattern (see \fBTcl_StringMatch\fR) that describes the
@@ -95,6 +95,7 @@ message should be left in the interpreter if the search fails.)
A script fragment to be installed as the unknown command handler for the
namespace, or NULL to reset the handler to its default.
.BE
+
.SH DESCRIPTION
.PP
Namespaces are hierarchic naming contexts that can contain commands
@@ -114,14 +115,11 @@ the global namespace.)
.PP
\fBTcl_CreateNamespace\fR creates a new namespace. The
\fIdeleteProc\fR will have the following type signature:
-.PP
.CS
-typedef void \fBTcl_NamespaceDeleteProc\fR(
- ClientData \fIclientData\fR);
+typedef void (Tcl_NamespaceDeleteProc) (ClientData clientData);
.CE
.PP
-\fBTcl_DeleteNamespace\fR deletes a namespace, calling the
-\fIdeleteProc\fR defined for the namespace (if any).
+\fBTcl_DeleteNamespace\fR deletes a namespace.
.PP
\fBTcl_AppendExportList\fR retrieves the export patterns for a
namespace given namespace and appends them (as list items) to
@@ -133,7 +131,7 @@ is true.
.PP
\fBTcl_Import\fR imports commands matching a pattern into a
namespace. Note that the pattern must include the name of the
-namespace to import from. This function returns TCL_ERROR if
+namespace to import from. This function returns an error if
an attempt to import a command over an existing command is made,
unless the \fIallowOverwrite\fR flag has been set.
.PP
@@ -159,19 +157,9 @@ 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)
+Tcl_CreateCommand, Tcl_ListObjAppendElements, Tcl_SetVar
+
.SH KEYWORDS
namespace, command