summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorapnadkarni <apnmbx-wits@yahoo.com>2023-04-19 14:33:40 (GMT)
committerapnadkarni <apnmbx-wits@yahoo.com>2023-04-19 14:33:40 (GMT)
commit883924f1e890e4530cfb1c6120e79b52e1db5ebf (patch)
tree52a027e02b050ff2aa4933383d32d11615ff5da0
parent11b8f6eb00bb80ed84c0b8f4c382b9626f94e7ea (diff)
downloadtcl-883924f1e890e4530cfb1c6120e79b52e1db5ebf.zip
tcl-883924f1e890e4530cfb1c6120e79b52e1db5ebf.tar.gz
tcl-883924f1e890e4530cfb1c6120e79b52e1db5ebf.tar.bz2
Minor doc corrections
-rw-r--r--doc/DString.321
-rw-r--r--doc/FileSystem.32
-rw-r--r--doc/ListObj.34
-rw-r--r--doc/StringObj.32
4 files changed, 15 insertions, 14 deletions
diff --git a/doc/DString.3 b/doc/DString.3
index ed2f429..78b2693 100644
--- a/doc/DString.3
+++ b/doc/DString.3
@@ -142,7 +142,8 @@ This saves the cost of allocating new memory and copying the string.
an empty string.
Since the dynamic string is reinitialized, there is no need to
further call \fBTcl_DStringFree\fR on it and it can be reused without
-calling \fBTcl_DStringInit\fR.
+calling \fBTcl_DStringInit\fR. The caller must ensure that the dynamic
+string stored in \fIdsPtr\fR is encoded in Tcl's internal UTF-8 format.
.PP
\fBTcl_DStringGetResult\fR does the opposite of \fBTcl_DStringResult\fR.
It sets the value of \fIdsPtr\fR to the result of \fIinterp\fR and
@@ -150,15 +151,15 @@ it clears \fIinterp\fR's result.
If possible it does this by moving a pointer rather than by copying
the string.
.PP
-\fBTcl_DStringToObj\fR returns a \fBTcl_Obj\fR containing the value of
-the dynamic string given by \fIdsPtr\fR. It does this by moving
-a pointer from \fIdsPtr\fR to a newly allocated \fBTcl_Obj\fR
-and reinitializing to dynamic string to an empty string.
-This saves the cost of allocating new memory and copying the string.
-Since the dynamic string is reinitialized, there is no need to
-further call \fBTcl_DStringFree\fR on it and it can be reused without
-calling \fBTcl_DStringInit\fR.
-The returned \fBTcl_Obj\fR has a reference count of 0.
+\fBTcl_DStringToObj\fR returns a \fBTcl_Obj\fR containing the value of the
+dynamic string given by \fIdsPtr\fR. It does this by moving a pointer from
+\fIdsPtr\fR to a newly allocated \fBTcl_Obj\fR and reinitializing to dynamic
+string to an empty string. This saves the cost of allocating new memory and
+copying the string. Since the dynamic string is reinitialized, there is no need
+to further call \fBTcl_DStringFree\fR on it and it can be reused without calling
+\fBTcl_DStringInit\fR. The returned \fBTcl_Obj\fR has a reference count of 0.
+The caller must ensure that the dynamic string stored in \fIdsPtr\fR is encoded
+in Tcl's internal UTF-8 format.
.SH KEYWORDS
append, dynamic string, free, result
diff --git a/doc/FileSystem.3 b/doc/FileSystem.3
index c25e28f..33becf7 100644
--- a/doc/FileSystem.3
+++ b/doc/FileSystem.3
@@ -269,7 +269,7 @@ allowed for the \fImode\fR argument to the Tcl \fBopen\fR command.
.AP int permissions in
POSIX-style permission flags such as 0644. If a new file is created, these
permissions will be set on the created file.
-.AP "ptrdiff_t \&| int" *lenPtr out
+.AP "Tcl_Size \&| int" *lenPtr out
If non-NULL, filled with the number of elements in the split path.
.AP Tcl_Obj *basePtr in
The base path on to which to join the given elements. May be NULL.
diff --git a/doc/ListObj.3 b/doc/ListObj.3
index 8d6c0d9..f63556b 100644
--- a/doc/ListObj.3
+++ b/doc/ListObj.3
@@ -59,7 +59,7 @@ points to the Tcl value that will be appended to \fIlistPtr\fR.
For \fBTcl_SetListObj\fR,
this points to the Tcl value that will be converted to a list value
containing the \fIobjc\fR elements of the array referenced by \fIobjv\fR.
-.AP "ptrdiff_t \&| int" *objcPtr in
+.AP "Tcl_Size \&| int" *objcPtr in
Points to location where \fBTcl_ListObjGetElements\fR
stores the number of element values in \fIlistPtr\fR.
.AP Tcl_Obj ***objvPtr out
@@ -76,7 +76,7 @@ An array of pointers to values.
\fBTcl_NewListObj\fR will insert these values into a new list value
and \fBTcl_ListObjReplace\fR will insert them into an existing \fIlistPtr\fR.
Each value will become a separate list element.
-.AP "ptrdiff_t \&| int" *lengthPtr out
+.AP "Tcl_Size \&| int" *lengthPtr out
Points to location where \fBTcl_ListObjLength\fR
stores the length of the list.
.AP Tcl_Size index in
diff --git a/doc/StringObj.3 b/doc/StringObj.3
index b995171..d835140 100644
--- a/doc/StringObj.3
+++ b/doc/StringObj.3
@@ -118,7 +118,7 @@ the last one available.
Points to a value to manipulate.
.AP Tcl_Obj *appendObjPtr in
The value to append to \fIobjPtr\fR in \fBTcl_AppendObjToObj\fR.
-.AP "ptrdiff_t \&| int" *lengthPtr out
+.AP "Tcl_Size \&| int" *lengthPtr out
The location where \fBTcl_GetStringFromObj\fR will store the length
of a value's string representation. May be (int *)NULL when not used.
.AP "const char" *string in