diff options
author | griffin <briang42@easystreet.net> | 2022-11-24 03:32:46 (GMT) |
---|---|---|
committer | griffin <briang42@easystreet.net> | 2022-11-24 03:32:46 (GMT) |
commit | a4e76a1c02f39e24cbf6ee4543ce76e34727cecd (patch) | |
tree | e1d9340dca5ec520a60fa97635105588433107a4 /doc | |
parent | 7b6d0229053cd8590549a3d9c256b97125455fd6 (diff) | |
parent | 6932d0c2d01a49afe9c6b163f3a3d939b0e2d603 (diff) | |
download | tcl-a4e76a1c02f39e24cbf6ee4543ce76e34727cecd.zip tcl-a4e76a1c02f39e24cbf6ee4543ce76e34727cecd.tar.gz tcl-a4e76a1c02f39e24cbf6ee4543ce76e34727cecd.tar.bz2 |
Sync with trunk
Diffstat (limited to 'doc')
-rw-r--r-- | doc/DString.3 | 17 | ||||
-rw-r--r-- | doc/IntObj.3 | 7 | ||||
-rw-r--r-- | doc/LinkVar.3 | 3 |
3 files changed, 24 insertions, 3 deletions
diff --git a/doc/DString.3 b/doc/DString.3 index cbce13f..5c4d8f4 100644 --- a/doc/DString.3 +++ b/doc/DString.3 @@ -39,6 +39,10 @@ char * \fBTcl_DStringResult\fR(\fIinterp, dsPtr\fR) .sp \fBTcl_DStringGetResult\fR(\fIinterp, dsPtr\fR) +.sp +Tcl_Obj * +\fBTcl_DStringToObj\fR(\fIdsPtr\fR) +.sp .SH ARGUMENTS .AS Tcl_DString newLength in/out .AP Tcl_DString *dsPtr in/out @@ -136,12 +140,25 @@ a pointer from \fIdsPtr\fR to the interpreter's result. This saves the cost of allocating new memory and copying the string. \fBTcl_DStringResult\fR also reinitializes the dynamic string to 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. .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 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. .SH KEYWORDS append, dynamic string, free, result diff --git a/doc/IntObj.3 b/doc/IntObj.3 index 703f2ce..d2954c8 100644 --- a/doc/IntObj.3 +++ b/doc/IntObj.3 @@ -8,7 +8,7 @@ .so man.macros .BS .SH NAME -Tcl_NewIntObj, Tcl_NewLongObj, Tcl_NewWideIntObj, Tcl_SetIntObj, Tcl_SetLongObj, Tcl_SetWideIntObj, Tcl_GetIntFromObj, Tcl_GetIntForIndex, Tcl_GetLongFromObj, Tcl_GetWideIntFromObj, Tcl_NewBignumObj, Tcl_SetBignumObj, Tcl_GetBignumFromObj, Tcl_TakeBignumFromObj \- manipulate Tcl values as integers +Tcl_NewIntObj, Tcl_NewLongObj, Tcl_NewWideIntObj, Tcl_SetIntObj, Tcl_SetLongObj, Tcl_SetWideIntObj, Tcl_GetIntFromObj, Tcl_GetIntForIndex, Tcl_GetLongFromObj, Tcl_GetWideIntFromObj, Tcl_GetWideUIntFromObj, Tcl_NewBignumObj, Tcl_SetBignumObj, Tcl_GetBignumFromObj, Tcl_TakeBignumFromObj \- manipulate Tcl values as integers .SH SYNOPSIS .nf \fB#include <tcl.h>\fR @@ -40,6 +40,9 @@ int int \fBTcl_GetWideIntFromObj\fR(\fIinterp, objPtr, widePtr\fR) .sp +int +\fBTcl_GetWideUIntFromObj\fR(\fIinterp, objPtr, uwidePtr\fR) +.sp .sp \fB#include <tclTomMath.h>\fR .sp @@ -84,6 +87,8 @@ Points to place to store the long integer value retrieved from \fIobjPtr\fR. Points to place to store the size_t value retrieved from \fIobjPtr\fR. .AP Tcl_WideInt *widePtr out Points to place to store the wide integer value retrieved from \fIobjPtr\fR. +.AP Tcl_WideUInt *uwidePtr out +Points to place to store the unsigned wide integer value retrieved from \fIobjPtr\fR. .AP mp_int *bigValue in/out Points to a multi-precision integer structure declared by the LibTomMath library. diff --git a/doc/LinkVar.3 b/doc/LinkVar.3 index db5a90b..f7ce3a3 100644 --- a/doc/LinkVar.3 +++ b/doc/LinkVar.3 @@ -239,8 +239,7 @@ The C variable, or each element of the C array, is of type \fBTcl_WideUInt\fR (which is an unsigned integer type at least 64-bits wide on all platforms that can support it.) Any value written into the Tcl variable must have a proper unsigned -wideinteger form acceptable to \fBTcl_GetBignumFromObj\fR and in the -platform's defined range for the \fBTcl_WideUInt\fR type; +wideinteger form acceptable to \fBTcl_GetWideUIntFromObj\fR; attempts to write non-integer values into \fIvarName\fR will be rejected with Tcl errors. Incomplete integer representations (like the empty string, '+', '-' or the hex/octal/decimal/binary prefix) are accepted |