summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2021-08-01 11:47:23 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2021-08-01 11:47:23 (GMT)
commit36dbbdbb723b994c072318068ca9c78aac8a2bcf (patch)
tree3ef46d84fc83d53f05ae6a3b492ac02d64935dce /doc
parentf107311e0a841c8971f748594a6e0bd179a2e436 (diff)
downloadtcl-36dbbdbb723b994c072318068ca9c78aac8a2bcf.zip
tcl-36dbbdbb723b994c072318068ca9c78aac8a2bcf.tar.gz
tcl-36dbbdbb723b994c072318068ca9c78aac8a2bcf.tar.bz2
Turn code snippets in TIP into a branch.
Diffstat (limited to 'doc')
-rw-r--r--doc/Class.315
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/Class.3 b/doc/Class.3
index 5f8e061..c89c5f4 100644
--- a/doc/Class.3
+++ b/doc/Class.3
@@ -55,6 +55,14 @@ Tcl_ObjectMapMethodNameProc
\fBTcl_ObjectGetMethodNameMapper\fR(\fIobject\fR)
.sp
\fBTcl_ObjectSetMethodNameMapper\fR(\fIobject\fR, \fImethodNameMapper\fR)
+.sp
+.VS "TIP 605"
+Tcl_Class
+\fBTcl_GetClassOfObject\fR(\fIobject\fR)
+.sp
+Tcl_Obj *
+\fBTcl_GetObjectClassName\fR(\fIinterp\fR, \fIobject\fR)
+.VE "TIP 605"
.SH ARGUMENTS
.AS ClientData metadata in/out
.AP Tcl_Interp *interp in/out
@@ -114,6 +122,13 @@ function. Note that the Tcl_Obj reference returned by \fBTcl_GetObjectName\fR
is a shared reference. You can also get whether the object has been marked for
deletion with \fBTcl_ObjectDeleted\fR (it returns true if deletion of the
object has begun); this can be useful during the processing of methods.
+.VS "TIP 605"
+The class of an object can be retrieved with \fBTcl_GetClassOfObject\fR, and
+the name of the class of an object with \fBTcl_GetObjectClassName\fR; note
+that these two \fImay\fR return NULL during deletion of an object (this is
+transient, and only occurs when the object is a long way through being
+deleted).
+.VE "TIP 605"
.PP
Instances of classes are created using \fBTcl_NewObjectInstance\fR, which
creates an object from any class (and which is internally called by both