summaryrefslogtreecommitdiffstats
path: root/doc/ObjectType.3
diff options
context:
space:
mode:
Diffstat (limited to 'doc/ObjectType.3')
-rw-r--r--doc/ObjectType.324
1 files changed, 14 insertions, 10 deletions
diff --git a/doc/ObjectType.3 b/doc/ObjectType.3
index 974ea6c..0c11187 100644
--- a/doc/ObjectType.3
+++ b/doc/ObjectType.3
@@ -15,7 +15,7 @@ Tcl_RegisterObjType, Tcl_GetObjType, Tcl_AppendAllObjTypes, Tcl_ConvertToType \
.sp
\fBTcl_RegisterObjType\fR(\fItypePtr\fR)
.sp
-Tcl_ObjType *
+const Tcl_ObjType *
\fBTcl_GetObjType\fR(\fItypeName\fR)
.sp
int
@@ -25,7 +25,7 @@ int
\fBTcl_ConvertToType\fR(\fIinterp, objPtr, typePtr\fR)
.SH ARGUMENTS
.AS "const char" *typeName
-.AP Tcl_ObjType *typePtr in
+.AP "const Tcl_ObjType" *typePtr in
Points to the structure containing information about the Tcl object type.
This storage must live forever,
typically by being statically allocated.
@@ -105,12 +105,12 @@ The \fBTcl_ObjType\fR structure is defined as follows:
.PP
.CS
typedef struct Tcl_ObjType {
- char *\fIname\fR;
+ const char *\fIname\fR;
Tcl_FreeInternalRepProc *\fIfreeIntRepProc\fR;
Tcl_DupInternalRepProc *\fIdupIntRepProc\fR;
Tcl_UpdateStringProc *\fIupdateStringProc\fR;
Tcl_SetFromAnyProc *\fIsetFromAnyProc\fR;
-} Tcl_ObjType;
+} \fBTcl_ObjType\fR;
.CE
.SS "THE NAME FIELD"
.PP
@@ -127,7 +127,8 @@ called to create a valid internal representation
from an object's string representation.
.PP
.CS
-typedef int (Tcl_SetFromAnyProc) (Tcl_Interp *\fIinterp\fR,
+typedef int \fBTcl_SetFromAnyProc\fR(
+ Tcl_Interp *\fIinterp\fR,
Tcl_Obj *\fIobjPtr\fR);
.CE
.PP
@@ -161,7 +162,7 @@ replace it with a new one or reset the \fItypePtr\fR member to NULL.
The \fIsetFromAnyProc\fR member may be set to NULL, if the routines
making use of the internal representation have no need to derive that
internal representation from an arbitrary string value. However, in
-this case, passing a pointer to the type to Tcl_ConvertToType() will
+this case, passing a pointer to the type to \fBTcl_ConvertToType\fR will
lead to a panic, so to avoid this possibility, the type
should \fInot\fR be registered.
.SS "THE UPDATESTRINGPROC FIELD"
@@ -171,7 +172,8 @@ called to create a valid string representation
from an object's internal representation.
.PP
.CS
-typedef void (Tcl_UpdateStringProc) (Tcl_Obj *\fIobjPtr\fR);
+typedef void \fBTcl_UpdateStringProc\fR(
+ Tcl_Obj *\fIobjPtr\fR);
.CE
.PP
\fIobjPtr\fR's \fIbytes\fR member is always NULL when it is called.
@@ -204,7 +206,8 @@ The \fIdupIntRepProc\fR member contains the address of a function
called to copy an internal representation from one object to another.
.PP
.CS
-typedef void (Tcl_DupInternalRepProc) (Tcl_Obj *\fIsrcPtr\fR,
+typedef void \fBTcl_DupInternalRepProc\fR(
+ Tcl_Obj *\fIsrcPtr\fR,
Tcl_Obj *\fIdupPtr\fR);
.CE
.PP
@@ -226,7 +229,8 @@ The \fIfreeIntRepProc\fR member contains the address of a function
that is called when an object is freed.
.PP
.CS
-typedef void (Tcl_FreeInternalRepProc) (Tcl_Obj *\fIobjPtr\fR);
+typedef void \fBTcl_FreeInternalRepProc\fR(
+ Tcl_Obj *\fIobjPtr\fR);
.CE
.PP
The \fIfreeIntRepProc\fR function can deallocate the storage
@@ -246,6 +250,6 @@ uses of that field during object deletion. The defined tasks for
the \fIfreeIntRepProc\fR have no need to consult the \fIbytes\fR
member.
.SH "SEE ALSO"
-Tcl_NewObj, Tcl_DecrRefCount, Tcl_IncrRefCount
+Tcl_NewObj(3), Tcl_DecrRefCount(3), Tcl_IncrRefCount(3)
.SH KEYWORDS
internal representation, object, object type, string representation, type conversion