summaryrefslogtreecommitdiffstats
path: root/doc/CrtObjCmd.3
diff options
context:
space:
mode:
authorjenglish <jenglish@flightlab.com>2002-05-17 00:26:53 (GMT)
committerjenglish <jenglish@flightlab.com>2002-05-17 00:26:53 (GMT)
commit7e8e79314878a879fbc31018efcbbc1e4d34afb8 (patch)
treeac2168cbb327f0d554dab9044573c414dfa737d5 /doc/CrtObjCmd.3
parent9018a322df4fd712fcccf6c37a9c9cf2559ff6fc (diff)
downloadtcl-7e8e79314878a879fbc31018efcbbc1e4d34afb8.zip
tcl-7e8e79314878a879fbc31018efcbbc1e4d34afb8.tar.gz
tcl-7e8e79314878a879fbc31018efcbbc1e4d34afb8.tar.bz2
Added Tcl_GetCommandFromObj, Tcl_GetCommandFullName
(Tcl Bug #547987, #414921)
Diffstat (limited to 'doc/CrtObjCmd.3')
-rw-r--r--doc/CrtObjCmd.323
1 files changed, 20 insertions, 3 deletions
diff --git a/doc/CrtObjCmd.3 b/doc/CrtObjCmd.3
index b1dc890..669a655 100644
--- a/doc/CrtObjCmd.3
+++ b/doc/CrtObjCmd.3
@@ -4,13 +4,13 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: CrtObjCmd.3,v 1.6 2002/02/10 20:36:33 kennykb Exp $
+'\" RCS: @(#) $Id: CrtObjCmd.3,v 1.7 2002/05/17 00:26:53 jenglish Exp $
'\"
.so man.macros
.TH Tcl_CreateObjCommand 3 8.0 Tcl "Tcl Library Procedures"
.BS
.SH NAME
-Tcl_CreateObjCommand, Tcl_DeleteCommand, Tcl_DeleteCommandFromToken, Tcl_GetCommandInfo, Tcl_GetCommandInfoFromToken, Tcl_SetCommandInfo, Tcl_SetCommandInfoFromToken, Tcl_GetCommandName \- implement new commands in C
+Tcl_CreateObjCommand, Tcl_DeleteCommand, Tcl_DeleteCommandFromToken, Tcl_GetCommandInfo, Tcl_GetCommandInfoFromToken, Tcl_SetCommandInfo, Tcl_SetCommandInfoFromToken, Tcl_GetCommandName, Tcl_GetCommandFullName, Tcl_GetCommandFromObj \- implement new commands in C
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
@@ -42,6 +42,12 @@ int
CONST char *
.VE
\fBTcl_GetCommandName\fR(\fIinterp, token\fR)
+.sp
+void
+\fBTcl_GetCommandFullName\fR(\fIinterp, token, objPtr\fR)
+.sp
+Tcl_Command
+\fBTcl_GetCommandFromObj\fR(\fIinterp, objPtr\fR)
.SH ARGUMENTS
.AS Tcl_ObjCmdProc *deleteProc in/out
.AP Tcl_Interp *interp in
@@ -65,6 +71,8 @@ The command must not have been deleted.
.AP Tcl_CmdInfo *infoPtr in/out
Pointer to structure containing various information about a
Tcl command.
+.AP Tcl_Obj *objPtr in
+Object containing the name of a Tcl command.
.BE
.SH DESCRIPTION
.PP
@@ -281,7 +289,16 @@ The string returned by \fBTcl_GetCommandName\fR is in dynamic memory
owned by Tcl and is only guaranteed to retain its value as long as the
command isn't deleted or renamed; callers should copy the string if
they need to keep it for a long time.
-
+.PP
+\fBTcl_GetCommandFullName\fR produces the fully-qualified name
+of a command from a command token.
+The name, including all namespace prefixes,
+is appended to the object specified by \fIobjPtr\fP.
+.PP
+\fBTcl_GetCommandFromObj\fR returns a token for the command
+specified by the name in a \fBTcl_Obj\fP.
+The command name is resolved relative to the current namespace.
+Returns NULL if the command is not found.
.SH "SEE ALSO"
Tcl_CreateCommand, Tcl_ResetResult, Tcl_SetObjResult